diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2015-02-09 15:07:44 +0100 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2015-02-12 09:58:29 +0000 |
commit | 1355ac5b05e41e132071ec0fd3f5d32a2625d9bc (patch) | |
tree | 4aaa1ca3ef800517cf0dff3b42bda85a7495d7a3 /src/corelib/tools | |
parent | 983fc2aa4a8a0698422f44461abb14f6dd46df8d (diff) |
Add Q_DECL_CONST_FUNCTION and Q_DECL_NOTHROW to qPopulationCount
Change-Id: I7602936b7064d6a87cd9fbfc4ab22a8fc881b9e9
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qalgorithms.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qalgorithms.h b/src/corelib/tools/qalgorithms.h index 06e82cf5f7..ff4d5a3ebd 100644 --- a/src/corelib/tools/qalgorithms.h +++ b/src/corelib/tools/qalgorithms.h @@ -526,7 +526,7 @@ QT_DEPRECATED_X("Use std::binary_search") Q_OUTOFLINE_TEMPLATE RandomAccessItera #define QALGORITHMS_USE_BUILTIN_POPCOUNT #endif -Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) +Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) Q_DECL_NOTHROW { #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT return __builtin_popcount(v); @@ -539,7 +539,7 @@ Q_DECL_CONSTEXPR inline uint qPopulationCount(quint32 v) #endif } -Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) +Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) Q_DECL_NOTHROW { #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT return __builtin_popcount(v); @@ -549,7 +549,7 @@ Q_DECL_CONSTEXPR inline uint qPopulationCount(quint8 v) #endif } -Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) +Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) Q_DECL_NOTHROW { #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT return __builtin_popcount(v); @@ -560,7 +560,7 @@ Q_DECL_CONSTEXPR inline uint qPopulationCount(quint16 v) #endif } -Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) +Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) Q_DECL_NOTHROW { #ifdef QALGORITHMS_USE_BUILTIN_POPCOUNT return __builtin_popcountll(v); @@ -575,7 +575,7 @@ Q_DECL_CONSTEXPR inline uint qPopulationCount(quint64 v) #endif } -Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) +Q_DECL_CONST_FUNCTION Q_DECL_CONSTEXPR inline uint qPopulationCount(long unsigned int v) Q_DECL_NOTHROW { return qPopulationCount(static_cast<quint64>(v)); } |