From d013aa16ef4255d01a6704102e00555fc7167b03 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 5 Feb 2020 15:11:54 +0100 Subject: Extend QContiguousCache to use qsizetype for size and indices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow for more than 2^31 items and large offsets. Change-Id: I42f7bf20ce0e4af43dbb2e2083abf0e232e68282 Reviewed-by: MÃ¥rten Nordheim --- src/corelib/tools/qcontiguouscache.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/corelib/tools/qcontiguouscache.cpp') 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(qMallocAligned(size, alignment)); + return static_cast(qMallocAligned(size_t(size), size_t(alignment))); } void QContiguousCacheData::freeData(QContiguousCacheData *data) -- cgit v1.2.3