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>bb10
parent
e721cf1508
commit
eb122a6fe4
|
|
@ -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,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue