diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-04 18:13:32 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-02 23:10:55 +0000 |
commit | d775b1fcb3fc7bd41af37f5d0a4d999320b62364 (patch) | |
tree | b4fe9a26c57520c87d2082abe0883d0ff21938da /src/corelib/tools/qmap.h | |
parent | 78a7e54f8f5c4ca6ce1ee6b0ac82c42b21738ac5 (diff) |
Remove handling of missing Q_COMPILER_INITIALIZER_LISTS
Change-Id: Id65b39c787235a051262544932e6717d076f1ea0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qmap.h')
-rw-r--r-- | src/corelib/tools/qmap.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h index 2d01a75a42..18c681581f 100644 --- a/src/corelib/tools/qmap.h +++ b/src/corelib/tools/qmap.h @@ -49,13 +49,10 @@ #include <QtCore/qdebug.h> #endif -#include <map> -#include <new> #include <functional> - -#ifdef Q_COMPILER_INITIALIZER_LISTS #include <initializer_list> -#endif +#include <map> +#include <new> QT_BEGIN_NAMESPACE @@ -326,14 +323,12 @@ class QMap public: inline QMap() noexcept : d(static_cast<QMapData<Key, T> *>(const_cast<QMapDataBase *>(&QMapDataBase::shared_null))) { } -#ifdef Q_COMPILER_INITIALIZER_LISTS inline QMap(std::initializer_list<std::pair<Key,T> > list) : d(static_cast<QMapData<Key, T> *>(const_cast<QMapDataBase *>(&QMapDataBase::shared_null))) { for (typename std::initializer_list<std::pair<Key,T> >::const_iterator it = list.begin(); it != list.end(); ++it) insert(it->first, it->second); } -#endif QMap(const QMap<Key, T> &other); inline ~QMap() { if (!d->ref.deref()) d->destroy(); } @@ -1186,13 +1181,11 @@ class QMultiMap : public QMap<Key, T> { public: QMultiMap() noexcept {} -#ifdef Q_COMPILER_INITIALIZER_LISTS inline QMultiMap(std::initializer_list<std::pair<Key,T> > list) { for (typename std::initializer_list<std::pair<Key,T> >::const_iterator it = list.begin(); it != list.end(); ++it) insert(it->first, it->second); } -#endif QMultiMap(const QMap<Key, T> &other) : QMap<Key, T>(other) {} QMultiMap(QMap<Key, T> &&other) noexcept : QMap<Key, T>(std::move(other)) {} void swap(QMultiMap<Key, T> &other) noexcept { QMap<Key, T>::swap(other); } |