summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2013-11-16 14:30:38 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-17 09:48:17 +0100
commiteb122a6fe4de5b95acb287f92c6ca5e81864b1c6 (patch)
tree340f9d9c54f502a8062bb8c6cdb768239a094d7c /tests/auto
parente721cf15081c8174a38797cc88f7c5197d9e527c (diff)
tst_QAlgorithms: fix compilation with C++11 enabled
GCC refuses to use a merely static const uint array in a constexpr function. Fix by making the array constexpr if supported by the compiler. Change-Id: Idd59d3f74f8f4e98aad82bc892f4a6469932df9f Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
index 144bc62b1b..64eb91b7b6 100644
--- a/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
+++ b/tests/auto/corelib/tools/qalgorithms/tst_qalgorithms.cpp
@@ -1027,7 +1027,7 @@ void tst_QAlgorithms::binaryFindOnLargeContainer() const
}
// alternative implementation of qPopulationCount for comparison:
-static const uint bitsSetInNibble[] = {
+static Q_DECL_CONSTEXPR const uint bitsSetInNibble[] = {
0, 1, 1, 2, 1, 2, 2, 3,
1, 2, 2, 3, 2, 3, 3, 4,
};