summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-06-28 17:58:18 -0700
committerThiago Macieira <thiago.macieira@intel.com>2014-06-30 21:33:46 +0200
commit4b28152da64f7f23a1bbb810d8cdb7626a5f0b8e (patch)
tree8c4f2b7e30d56e5fefb3a9a1dae74cbcb99b1040 /src/corelib/tools
parent62620a4d6a65e0935c5f8ed71109bea6e8e85500 (diff)
Make QFreeList constexpr
It's still not a literal type because the destructor is not constexpr Change-Id: If89bdfdd3f0ffe9bdd5a7953e872e520e92cfd66 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qfreelist_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qfreelist_p.h b/src/corelib/tools/qfreelist_p.h
index ca946cbd8a..d6d3a3ad3d 100644
--- a/src/corelib/tools/qfreelist_p.h
+++ b/src/corelib/tools/qfreelist_p.h
@@ -191,7 +191,7 @@ class QFreeList
Q_DISABLE_COPY(QFreeList)
public:
- inline QFreeList();
+ Q_DECL_CONSTEXPR inline QFreeList();
inline ~QFreeList();
// returns the payload for the given index \a x
@@ -207,7 +207,7 @@ public:
};
template <typename T, typename ConstantsType>
-inline QFreeList<T, ConstantsType>::QFreeList()
+Q_DECL_CONSTEXPR inline QFreeList<T, ConstantsType>::QFreeList()
: _next(ConstantsType::InitialNextValue)
{ }