From 274e571be1f5786b4db5de6e22661490f1232dc7 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Fri, 7 Jun 2013 13:51:13 +0200 Subject: QtCore: Fix MSVC-64 warnings about integer truncation. warning C4267: 'argument' : conversion from 'size_t' to ' int', possible loss of data. Change-Id: I79af7497420d468b5bc7c48c9ae21b86117519a9 Reviewed-by: Mitch Curtis --- src/corelib/tools/qarraydataops.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/corelib/tools/qarraydataops.h') diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index 3cd8c51c07..c8a0825480 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -62,7 +62,7 @@ struct QPodArrayOps Q_ASSERT(newSize <= this->alloc); ::memset(this->end(), 0, (newSize - this->size) * sizeof(T)); - this->size = newSize; + this->size = int(newSize); } void copyAppend(const T *b, const T *e) @@ -84,7 +84,7 @@ struct QPodArrayOps const T *const end = iter + n; for (; iter != end; ++iter) ::memcpy(iter, &t, sizeof(T)); - this->size += n; + this->size += int(n); } void truncate(size_t newSize) @@ -92,7 +92,7 @@ struct QPodArrayOps Q_ASSERT(!this->ref.isShared()); Q_ASSERT(newSize < size_t(this->size)); - this->size = newSize; + this->size = int(newSize); } void destroyAll() // Call from destructors, ONLY! -- cgit v1.2.3