summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/tools
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-02-26 16:07:49 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2015-03-12 05:33:20 +0000
commit9dd0bb851b34fcfea5e9be106d8f4209d59d5bf5 (patch)
tree238e1b1a79919103da6d1d127b8e785767509409 /tests/benchmarks/corelib/tools
parent2d5210a684b266e71fc6f7efbd81fbfd720b341c (diff)
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 <thiago.macieira@intel.com>
Diffstat (limited to 'tests/benchmarks/corelib/tools')
-rw-r--r--tests/benchmarks/corelib/tools/qringbuffer/main.cpp4
1 files changed, 2 insertions, 2 deletions
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);
}
}