diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 2e98fcedca..581d8711db 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -298,6 +298,10 @@ private: class AlignmentDummy { Data header; T array[1]; }; }; +#ifdef Q_CC_MSVC +# pragma warning ( disable : 4345 ) // behavior change: an object of POD type constructed with an initializer of the form () will be default-initialized +#endif + template void QVector::defaultConstruct(T *from, T *to) { @@ -310,6 +314,10 @@ void QVector::defaultConstruct(T *from, T *to) } } +#ifdef Q_CC_MSVC +# pragma warning ( default: 4345 ) +#endif + template void QVector::copyConstruct(T *srcFrom, T *srcTo, T *dstFrom) { @@ -569,10 +577,10 @@ void QVector::realloc(const int asize, const int aalloc, QArrayData::Allocati } Q_ASSERT(d->data()); - Q_ASSERT(d->size <= d->alloc); + Q_ASSERT(uint(d->size) <= d->alloc); Q_ASSERT(d != Data::unsharableEmpty()); Q_ASSERT(aalloc ? d != Data::sharedNull() : d == Data::sharedNull()); - Q_ASSERT(d->alloc >= aalloc); + Q_ASSERT(d->alloc >= uint(aalloc)); Q_ASSERT(d->size == asize); }