Make the QIncompatibleFlag constexpr.
Change-Id: If99b43b45cc667449dbe7c487b56885c6ce9b1c7 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
8683ee14cc
commit
2750832410
@ -62,11 +62,11 @@ class QIncompatibleFlag
|
||||
{
|
||||
int i;
|
||||
public:
|
||||
inline explicit QIncompatibleFlag(int i);
|
||||
Q_DECL_CONSTEXPR inline explicit QIncompatibleFlag(int i);
|
||||
inline operator int() const { return i; }
|
||||
};
|
||||
|
||||
inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {}
|
||||
Q_DECL_CONSTEXPR inline QIncompatibleFlag::QIncompatibleFlag(int ai) : i(ai) {}
|
||||
|
||||
|
||||
#ifndef Q_NO_TYPESAFE_FLAGS
|
||||
@ -114,7 +114,7 @@ public:
|
||||
typedef QFlags<Enum> Flags;
|
||||
|
||||
#define Q_DECLARE_INCOMPATIBLE_FLAGS(Flags) \
|
||||
inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
|
||||
Q_DECL_CONSTEXPR inline QIncompatibleFlag operator|(Flags::enum_type f1, int f2) \
|
||||
{ return QIncompatibleFlag(int(f1) | f2); }
|
||||
|
||||
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags) \
|
||||
|
Loading…
Reference in New Issue
Block a user