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<QString>::QList(std::initializer_list<T>)' Change-Id: I8a11e298cd10da199490fbd8b269405a9e1cf5f3 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
f6ee80912f
commit
02702dd776
@ -130,7 +130,7 @@ public:
|
||||
#ifdef Q_COMPILER_INITIALIZER_LISTS
|
||||
inline QList(std::initializer_list<T> args)
|
||||
: d(const_cast<QListData::Data *>(&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<T> &l) const;
|
||||
inline bool operator!=(const QList<T> &l) const { return !(*this == l); }
|
||||
|
Loading…
Reference in New Issue
Block a user