summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qcontiguouscache.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2020-02-05 15:11:54 +0100
committerLars Knoll <lars.knoll@qt.io>2020-03-14 10:36:47 +0100
commitd013aa16ef4255d01a6704102e00555fc7167b03 (patch)
tree9413bd8ab60c7494a96fd627afba5ba0f7bddfb9 /src/corelib/tools/qcontiguouscache.cpp
parentbf7debf658ce65ada062c9a129320c7356becfd1 (diff)
Extend QContiguousCache to use qsizetype for size and indices
Allow for more than 2^31 items and large offsets. Change-Id: I42f7bf20ce0e4af43dbb2e2083abf0e232e68282 Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/tools/qcontiguouscache.cpp')
-rw-r--r--src/corelib/tools/qcontiguouscache.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp
index 64cbd7df4b..cc3510ef88 100644
--- a/src/corelib/tools/qcontiguouscache.cpp
+++ b/src/corelib/tools/qcontiguouscache.cpp
@@ -54,9 +54,9 @@ void QContiguousCacheData::dump() const
}
#endif
-QContiguousCacheData *QContiguousCacheData::allocateData(int size, int alignment)
+QContiguousCacheData *QContiguousCacheData::allocateData(qsizetype size, qsizetype alignment)
{
- return static_cast<QContiguousCacheData *>(qMallocAligned(size, alignment));
+ return static_cast<QContiguousCacheData *>(qMallocAligned(size_t(size), size_t(alignment)));
}
void QContiguousCacheData::freeData(QContiguousCacheData *data)