summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-05-02 17:15:08 +0200
committerQt by Nokia <qt-info@nokia.com>2012-05-03 06:10:15 +0200
commit425b925b7e9dd818f2a58fd7bc77bfe8475e6483 (patch)
tree6858b20e8bfcfd08240f3f4c8cbdb9ac9cbfd898
parent19d160b72ba8e1f52eab63e73c85f0e60f630cc6 (diff)
Simplify the size of the QVarLengthArray buffer.
The previous calculation was too complex for no good reason. QVarLengthArray actually doesn't change the size after this change due to padding, but we don't need to include the padding in our own calculation. Task-number: QTBUG-25113 Change-Id: I72ea214f0d96870ecf8ff65737e7ca14e19afc7a Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
-rw-r--r--src/corelib/tools/qvarlengtharray.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index 639d2463fd..58b26be4a9 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -180,8 +180,7 @@ private:
int s; // size
T *ptr; // data
union {
- // ### Qt 5: Use 'Prealloc * sizeof(T)' as array size
- char array[sizeof(qint64) * (((Prealloc * sizeof(T)) / sizeof(qint64)) + 1)];
+ char array[Prealloc * sizeof(T)];
qint64 q_for_alignment_1;
double q_for_alignment_2;
};