diff options
Diffstat (limited to 'tests/benchmarks/corelib/tools')
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/benchmarks/corelib/tools/containers-associative/main.cpp b/tests/benchmarks/corelib/tools/containers-associative/main.cpp index e4511f4935..d2275ddb92 100644 --- a/tests/benchmarks/corelib/tools/containers-associative/main.cpp +++ b/tests/benchmarks/corelib/tools/containers-associative/main.cpp @@ -52,7 +52,7 @@ private slots: void lookup(); }; -template <typename T> +template <typename T> void testInsert(int size) { T container; @@ -69,7 +69,7 @@ void tst_associative_containers::insert_data() QTest::addColumn<int>("size"); for (int size = 10; size < 20000; size += 100) { - + const QByteArray sizeString = QByteArray::number(size); QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size; @@ -86,9 +86,9 @@ void tst_associative_containers::insert() QMap<int, int> testMap; if (useHash) { - testInsert<QHash<int, int> >(size); + testInsert<QHash<int, int> >(size); } else { - testInsert<QMap<int, int> >(size); + testInsert<QMap<int, int> >(size); } } @@ -101,7 +101,7 @@ void tst_associative_containers::lookup_data() QTest::addColumn<int>("size"); for (int size = 10; size < 20000; size += 100) { - + const QByteArray sizeString = QByteArray::number(size); QTest::newRow(QByteArray("hash--" + sizeString).constData()) << true << size; @@ -109,11 +109,11 @@ void tst_associative_containers::lookup_data() } } -template <typename T> +template <typename T> void testLookup(int size) { T container; - + for (int i = 0; i < size; ++i) container.insert(i, i); @@ -122,7 +122,7 @@ void testLookup(int size) QBENCHMARK { for (int i = 0; i < size; ++i) val = container.value(i); - + } } diff --git a/tests/benchmarks/corelib/tools/qregexp/main.cpp b/tests/benchmarks/corelib/tools/qregexp/main.cpp index a34888ab13..3f8ebbecc5 100644 --- a/tests/benchmarks/corelib/tools/qregexp/main.cpp +++ b/tests/benchmarks/corelib/tools/qregexp/main.cpp @@ -139,13 +139,13 @@ void tst_qregexp::escape_data() QTest::newRow("escape 0") << "Hello world" << "Hello world"; QTest::newRow("escape 1") << "(Hello world)" << "\\(Hello world\\)"; - { + { QString s; for (int i = 0; i < 10; ++i) s += "(escape)"; QTest::newRow("escape 10") << s << QRegExp::escape(s); } - { + { QString s; for (int i = 0; i < 100; ++i) s += "(escape)"; @@ -242,7 +242,7 @@ void tst_qregexp::escape_new2() *quotedData = c; ++quotedData; } - quoted.resize(pattern.size() + escaped); + quoted.resize(pattern.size() + escaped); verify(quoted, expected); } @@ -329,7 +329,7 @@ void tst_qregexp::escape_new4() const QLatin1Char backslash('\\'); QString quoted(n * 2, backslash); QChar *quotedData = quoted.data(); - for (int j = 0; j != i; ++j) + for (int j = 0; j != i; ++j) *quotedData++ = *patternData++; int escaped = 0; for (; i != n; ++i) { @@ -342,7 +342,7 @@ void tst_qregexp::escape_new4() ++quotedData; ++patternData; } - quoted.resize(n + escaped); + quoted.resize(n + escaped); verify(quoted, expected); // "return quoted" } diff --git a/tests/benchmarks/corelib/tools/qvector/main.cpp b/tests/benchmarks/corelib/tools/qvector/main.cpp index 3c6defb572..f7325f7998 100644 --- a/tests/benchmarks/corelib/tools/qvector/main.cpp +++ b/tests/benchmarks/corelib/tools/qvector/main.cpp @@ -83,7 +83,7 @@ qvector_const_read_access: xorl %eax, %eax .L183: ! fldl s -! faddl 16(%edx,%eax,8) +! faddl 16(%edx,%eax,8) ! addl $1, %eax ! cmpl $10000, %eax ! fstpl s diff --git a/tests/benchmarks/corelib/tools/qvector/qrawvector.h b/tests/benchmarks/corelib/tools/qvector/qrawvector.h index 3f0d72a231..f358909eb1 100644 --- a/tests/benchmarks/corelib/tools/qvector/qrawvector.h +++ b/tests/benchmarks/corelib/tools/qvector/qrawvector.h @@ -100,7 +100,7 @@ public: static T *fromBase(void *d) { return (T*)((char*)d + offsetOfTypedData()); } - inline QRawVector() + inline QRawVector() { m_begin = fromBase(0); m_alloc = m_size = 0; realloc(m_size, m_alloc, true); } explicit QRawVector(int size); QRawVector(int size, const T &t); |