From f02b849e9721f030af7147d1fed28ce7564b95a2 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sun, 16 Nov 2014 13:55:35 +0100 Subject: [PATCH] Add Q_DECL_RELAXED_CONSTEXPR to QChar Change-Id: I7c5a951bcd952ce5c1aaa62e107a800d49038f22 Reviewed-by: Marc Mutz --- src/corelib/tools/qchar.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/corelib/tools/qchar.h b/src/corelib/tools/qchar.h index a1219f5342..fc1fc7bc16 100644 --- a/src/corelib/tools/qchar.h +++ b/src/corelib/tools/qchar.h @@ -409,7 +409,7 @@ public: #endif Q_DECL_CONSTEXPR inline char toLatin1() const Q_DECL_NOTHROW { return ucs > 0xff ? '\0' : char(ucs); } Q_DECL_CONSTEXPR inline ushort unicode() const Q_DECL_NOTHROW { return ucs; } - inline ushort &unicode() Q_DECL_NOTHROW { return ucs; } + Q_DECL_RELAXED_CONSTEXPR inline ushort &unicode() Q_DECL_NOTHROW { return ucs; } #if QT_DEPRECATED_SINCE(5, 0) QT_DEPRECATED static Q_DECL_CONSTEXPR inline QChar fromAscii(char c) Q_DECL_NOTHROW @@ -439,8 +439,8 @@ public: Q_DECL_CONSTEXPR inline uchar cell() const Q_DECL_NOTHROW { return uchar(ucs & 0xff); } Q_DECL_CONSTEXPR inline uchar row() const Q_DECL_NOTHROW { return uchar((ucs>>8)&0xff); } - inline void setCell(uchar acell) Q_DECL_NOTHROW { ucs = ushort((ucs & 0xff00) + acell); } - inline void setRow(uchar arow) Q_DECL_NOTHROW { ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); } + Q_DECL_RELAXED_CONSTEXPR inline void setCell(uchar acell) Q_DECL_NOTHROW { ucs = ushort((ucs & 0xff00) + acell); } + Q_DECL_RELAXED_CONSTEXPR inline void setRow(uchar arow) Q_DECL_NOTHROW { ucs = ushort((ushort(arow)<<8) + (ucs&0xff)); } static Q_DECL_CONSTEXPR inline bool isNonCharacter(uint ucs4) Q_DECL_NOTHROW {