Mark QMetaMethod and related constructor as constepxr

qtdelcarative's qquickaccessibleattached.cpp contains now some static
instance of QMetaMethod.  Marking the constructor as constexpr,
let GCC to remove call to the constructor at load time.

Change-Id: Ic5ab7db0d06caa08f15d65d3bb5f22a34a111fee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
This commit is contained in:
Olivier Goffart 2014-10-31 12:27:34 +01:00
parent f0b7abf2ef
commit 08b1afc8f4

View File

@ -47,7 +47,7 @@ template <typename T> class QList;
class Q_CORE_EXPORT QMetaMethod
{
public:
inline QMetaMethod() : mobj(0),handle(0) {}
Q_DECL_CONSTEXPR inline QMetaMethod() : mobj(0),handle(0) {}
QByteArray methodSignature() const;
QByteArray name() const;
@ -175,7 +175,7 @@ inline bool operator!=(const QMetaMethod &m1, const QMetaMethod &m2)
class Q_CORE_EXPORT QMetaEnum
{
public:
inline QMetaEnum() : mobj(0),handle(0) {}
Q_DECL_CONSTEXPR inline QMetaEnum() : mobj(0),handle(0) {}
const char *name() const;
bool isFlag() const;
@ -253,7 +253,7 @@ private:
class Q_CORE_EXPORT QMetaClassInfo
{
public:
inline QMetaClassInfo() : mobj(0),handle(0) {}
Q_DECL_CONSTEXPR inline QMetaClassInfo() : mobj(0),handle(0) {}
const char *name() const;
const char *value() const;
inline const QMetaObject *enclosingMetaObject() const { return mobj; }