diff options
author | Liang Qi <liang.qi@qt.io> | 2018-05-14 14:51:46 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2018-05-14 14:51:46 +0200 |
commit | 7e1b504f31dcdad0b055c1532209e44f81033bc9 (patch) | |
tree | b7ab4b258a50af69179fa6efb4871c7218e475e1 /src/corelib/tools/qarraydataops.h | |
parent | 432df3f8c8504b333ecc76df4ce19a7b2c04ae77 (diff) | |
parent | 627de835b1b87280741eb96ae77ea42b1f6ef5dc (diff) |
Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
mkspecs/features/qt_module_headers.prf
tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
tests/auto/widgets/kernel/qwidget/BLACKLIST
Change-Id: I2a08952d28d1d0e3d73f521a3d44700ce79ff16c
Diffstat (limited to 'src/corelib/tools/qarraydataops.h')
-rw-r--r-- | src/corelib/tools/qarraydataops.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/tools/qarraydataops.h b/src/corelib/tools/qarraydataops.h index d0f83d2b6a..7e1b43f9b1 100644 --- a/src/corelib/tools/qarraydataops.h +++ b/src/corelib/tools/qarraydataops.h @@ -65,7 +65,7 @@ struct QPodArrayOps Q_ASSERT(newSize > uint(this->size)); Q_ASSERT(newSize <= this->alloc); - ::memset(this->end(), 0, (newSize - this->size) * sizeof(T)); + ::memset(static_cast<void *>(this->end()), 0, (newSize - this->size) * sizeof(T)); this->size = int(newSize); } @@ -121,8 +121,9 @@ struct QPodArrayOps Q_ASSERT(e <= where || b > this->end()); // No overlap Q_ASSERT(size_t(e - b) <= this->alloc - uint(this->size)); - ::memmove(where + (e - b), where, (static_cast<const T*>(this->end()) - where) * sizeof(T)); - ::memcpy(where, b, (e - b) * sizeof(T)); + ::memmove(static_cast<void *>(where + (e - b)), static_cast<void *>(where), + (static_cast<const T*>(this->end()) - where) * sizeof(T)); + ::memcpy(static_cast<void *>(where), static_cast<const void *>(b), (e - b) * sizeof(T)); this->size += (e - b); } @@ -133,7 +134,8 @@ struct QPodArrayOps Q_ASSERT(b >= this->begin() && b < this->end()); Q_ASSERT(e > this->begin() && e < this->end()); - ::memmove(b, e, (static_cast<T *>(this->end()) - e) * sizeof(T)); + ::memmove(static_cast<void *>(b), static_cast<void *>(e), + (static_cast<T *>(this->end()) - e) * sizeof(T)); this->size -= (e - b); } }; |