From 9dd0bb851b34fcfea5e9be106d8f4209d59d5bf5 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Thu, 26 Feb 2015 16:07:49 +0200 Subject: Make QRingBuffer a 64-bit safe According to I/O API, QIODevice and its inherited classes should be able to process a full 64-bit offsets and lengths. This requires 64-bit parameters in operations with internal buffers. Rework QRingBuffer to avoid implicit truncation of numbers and fix some 64-bit issues in code. Change-Id: Iadd6fd5fefd2d64e6c084e2feebb4dc2d6df66de Reviewed-by: Thiago Macieira --- tests/benchmarks/corelib/tools/qringbuffer/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/benchmarks') diff --git a/tests/benchmarks/corelib/tools/qringbuffer/main.cpp b/tests/benchmarks/corelib/tools/qringbuffer/main.cpp index 6bb82a8056..cf55aeaee5 100644 --- a/tests/benchmarks/corelib/tools/qringbuffer/main.cpp +++ b/tests/benchmarks/corelib/tools/qringbuffer/main.cpp @@ -48,10 +48,10 @@ void tst_qringbuffer::reserveAndRead() { QRingBuffer ringBuffer; QBENCHMARK { - for (int i = 1; i < 256; ++i) + for (qint64 i = 1; i < 256; ++i) ringBuffer.reserve(i); - for (int i = 1; i < 256; ++i) + for (qint64 i = 1; i < 256; ++i) ringBuffer.read(0, i); } } -- cgit v1.2.3