Silence a GCC 8 warning in QIODevice
qtbase/src/corelib/io/qiodevice.cpp:688:60: required from here ../../../include/QtCore/../../../../qtbase/src/corelib/tools/qvector.h:727:20: error: ‘void* memmove(void*, const void*, size_t)’ writing to an object of type ‘class QRingBuffer’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Werror=class-memaccess] memmove(i, b, (d->size - offset) * sizeof(T)); ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: I9dc9a17c281b71bf2eb3e89116600ec3ba345d74 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
3024fd60ae
commit
b34942710c
@ -724,7 +724,7 @@ typename QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, c
|
||||
} else {
|
||||
T *b = d->begin() + offset;
|
||||
T *i = b + n;
|
||||
memmove(i, b, (d->size - offset) * sizeof(T));
|
||||
memmove(static_cast<void *>(i), static_cast<const void *>(b), (d->size - offset) * sizeof(T));
|
||||
while (i != b)
|
||||
new (--i) T(copy);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user