From a1e62e7ba14b00ac7c361936a18e7bc42bf1286d Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:54:54 +0200 Subject: 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 --- src/corelib/codecs/qtextcodec.cpp | 2 +- src/corelib/codecs/qutfcodec.cpp | 4 ++-- src/corelib/codecs/qutfcodec_p.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/corelib/codecs') 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(buffer); const uchar *src = reinterpret_cast(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); -- cgit v1.2.3