diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-02 10:54:54 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-04-03 13:49:45 +0000 |
commit | a1e62e7ba14b00ac7c361936a18e7bc42bf1286d (patch) | |
tree | 50f5188dbc6092aca660eec970d71fe5ce1706ae /src/corelib/codecs | |
parent | 6c761a0db11b7a2b0104dbf46607ca396ae7ee2d (diff) |
Replace Q_DECL_NOEXCEPT with noexcept in corelib
In preparation of Qt6 move away from pre-C++11 macros.
Change-Id: I44126693c20c18eca5620caab4f7e746218e0ce3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/codecs')
-rw-r--r-- | src/corelib/codecs/qtextcodec.cpp | 2 | ||||
-rw-r--r-- | src/corelib/codecs/qutfcodec.cpp | 4 | ||||
-rw-r--r-- | src/corelib/codecs/qutfcodec_p.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/codecs/qtextcodec.cpp b/src/corelib/codecs/qtextcodec.cpp index e2598b7858..cac631d770 100644 --- a/src/corelib/codecs/qtextcodec.cpp +++ b/src/corelib/codecs/qtextcodec.cpp @@ -1061,7 +1061,7 @@ QString QTextDecoder::toUnicode(const char *chars, int len) } // in qstring.cpp: -void qt_from_latin1(ushort *dst, const char *str, size_t size) Q_DECL_NOTHROW; +void qt_from_latin1(ushort *dst, const char *str, size_t size) noexcept; /*! \overload diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index 643c8ee475..85736fdf02 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -54,7 +54,7 @@ static const uchar utf8bom[] = { 0xef, 0xbb, 0xbf }; #if (defined(__SSE2__) && defined(QT_COMPILER_SUPPORTS_SSE2)) \ || (defined(__ARM_NEON__) && defined(Q_PROCESSOR_ARM_64)) -static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) Q_DECL_NOTHROW +static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) noexcept { uint result = qCountLeadingZeroBits(v); // Now Invert the result: clz will count *down* from the msb to the lsb, so the msb index is 31 @@ -504,7 +504,7 @@ QString QUtf8::convertToUnicode(const char *chars, int len) This function never throws. */ -QChar *QUtf8::convertToUnicode(QChar *buffer, const char *chars, int len) Q_DECL_NOTHROW +QChar *QUtf8::convertToUnicode(QChar *buffer, const char *chars, int len) noexcept { ushort *dst = reinterpret_cast<ushort *>(buffer); const uchar *src = reinterpret_cast<const uchar *>(chars); diff --git a/src/corelib/codecs/qutfcodec_p.h b/src/corelib/codecs/qutfcodec_p.h index b24283ac5e..083e16317a 100644 --- a/src/corelib/codecs/qutfcodec_p.h +++ b/src/corelib/codecs/qutfcodec_p.h @@ -291,7 +291,7 @@ enum DataEndianness struct QUtf8 { - static QChar *convertToUnicode(QChar *, const char *, int) Q_DECL_NOTHROW; + static QChar *convertToUnicode(QChar *, const char *, int) noexcept; static QString convertToUnicode(const char *, int); static QString convertToUnicode(const char *, int, QTextCodec::ConverterState *); static QByteArray convertFromUnicode(const QChar *, int); |