From 1355ac5b05e41e132071ec0fd3f5d32a2625d9bc Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 9 Feb 2015 15:07:44 +0100 Subject: Add Q_DECL_CONST_FUNCTION and Q_DECL_NOTHROW to qPopulationCount Change-Id: I7602936b7064d6a87cd9fbfc4ab22a8fc881b9e9 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/tools/qalgorithms.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/corelib') 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(v)); } -- cgit v1.2.3