Reapply 403343039d on 5.11

This change amends 305dd1b61f, which lost
40334303 and brought src/corelib/xml/qxmlstream_p.h back. In
a6b697ca13, it was moved to
src/corelib/serialization/qxmlstream_p.h in 5.11.

Change-Id: Ia1e9841b866ff49f7274b1b13fd224c0a20a017e
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
Liang Qi 2018-02-23 10:04:56 +01:00
parent 5cfd5fd9d7
commit 3fcedcbabb
2 changed files with 2 additions and 1967 deletions

View File

@ -651,7 +651,8 @@ public:
inline void reserve(int extraCapacity) {
if (tos + extraCapacity + 1 > cap) {
cap = qMax(tos + extraCapacity + 1, cap << 1 );
data = reinterpret_cast<T *>(realloc(data, cap * sizeof(T)));
void *ptr = realloc(static_cast<void *>(data), cap * sizeof(T));
data = reinterpret_cast<T *>(ptr);
Q_CHECK_PTR(data);
}
}

File diff suppressed because it is too large Load Diff