From 02702dd7760e3aea704613cf03e6d92d54101717 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Mon, 4 Aug 2014 16:53:02 +0200 Subject: QList: Fix MSVC 64bit warning about loss of data. qlist.h(133) : warning C4267: 'argument' : conversion from 'size_t' to 'int', possible loss of data qlist.h(131) : while compiling class template member function 'QList::QList(std::initializer_list)' Change-Id: I8a11e298cd10da199490fbd8b269405a9e1cf5f3 Reviewed-by: Olivier Goffart --- src/corelib/tools/qlist.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/tools/qlist.h') diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h index 8cfd1a8f8b..39c1c46f6e 100644 --- a/src/corelib/tools/qlist.h +++ b/src/corelib/tools/qlist.h @@ -130,7 +130,7 @@ public: #ifdef Q_COMPILER_INITIALIZER_LISTS inline QList(std::initializer_list args) : d(const_cast(&QListData::shared_null)) - { reserve(args.size()); std::copy(args.begin(), args.end(), std::back_inserter(*this)); } + { reserve(int(args.size())); std::copy(args.begin(), args.end(), std::back_inserter(*this)); } #endif bool operator==(const QList &l) const; inline bool operator!=(const QList &l) const { return !(*this == l); } -- cgit v1.2.3