diff options
Diffstat (limited to 'src/corelib/text')
| -rw-r--r-- | src/corelib/text/qanystringview.h | 2 | ||||
| -rw-r--r-- | src/corelib/text/qlocale_tools.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/text/qstring.cpp | 2 | ||||
| -rw-r--r-- | src/corelib/text/qstringalgorithms.h | 4 | ||||
| -rw-r--r-- | src/corelib/text/qstringconverter.cpp | 6 | ||||
| -rw-r--r-- | src/corelib/text/qstringliteral.h | 2 | ||||
| -rw-r--r-- | src/corelib/text/qstringview.h | 2 |
7 files changed, 10 insertions, 10 deletions
diff --git a/src/corelib/text/qanystringview.h b/src/corelib/text/qanystringview.h index 34cf3e66a86..4b89fa6edbf 100644 --- a/src/corelib/text/qanystringview.h +++ b/src/corelib/text/qanystringview.h @@ -200,7 +200,7 @@ public: inline constexpr QAnyStringView(QLatin1StringView str) noexcept; template <typename Container, if_compatible_container<Container> = true> - constexpr Q_ALWAYS_INLINE QAnyStringView(const Container &c) noexcept + Q_ALWAYS_INLINE constexpr QAnyStringView(const Container &c) noexcept : QAnyStringView(std::data(c), QtPrivate::lengthHelperContainer(c)) {} template <typename Container, if_convertible_to<QString, Container> = true> diff --git a/src/corelib/text/qlocale_tools.cpp b/src/corelib/text/qlocale_tools.cpp index cf111e9ecab..ec022c786de 100644 --- a/src/corelib/text/qlocale_tools.cpp +++ b/src/corelib/text/qlocale_tools.cpp @@ -474,7 +474,7 @@ QSimpleParsedNumber<qlonglong> qstrntoll(const char *begin, qsizetype size, int } template <typename Char> -static Q_ALWAYS_INLINE void qulltoString_helper(qulonglong number, int base, Char *&p) +Q_ALWAYS_INLINE static void qulltoString_helper(qulonglong number, int base, Char *&p) { // Performance-optimized code. Compiler can generate faster code when base is known. switch (base) { diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp index 40987ee3ec3..79d3c544f30 100644 --- a/src/corelib/text/qstring.cpp +++ b/src/corelib/text/qstring.cpp @@ -372,7 +372,7 @@ static constexpr bool UseAvx2 = UseSse4_1 && (qCompilerCpuFeatures & CpuFeatureArchHaswell) == CpuFeatureArchHaswell; [[maybe_unused]] -static Q_ALWAYS_INLINE __m128i mm_load8_zero_extend(const void *ptr) +Q_ALWAYS_INLINE static __m128i mm_load8_zero_extend(const void *ptr) { const __m128i *dataptr = static_cast<const __m128i *>(ptr); if constexpr (UseSse4_1) { diff --git a/src/corelib/text/qstringalgorithms.h b/src/corelib/text/qstringalgorithms.h index 7b80352eec8..404eb79e70c 100644 --- a/src/corelib/text/qstringalgorithms.h +++ b/src/corelib/text/qstringalgorithms.h @@ -129,7 +129,7 @@ namespace QtPrivate { [[nodiscard]] Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isLatin1(QStringView s) noexcept; [[nodiscard]] Q_CORE_EXPORT Q_DECL_PURE_FUNCTION bool isValidUtf16(QStringView s) noexcept; -template <typename Char, size_t N> [[nodiscard]] constexpr Q_ALWAYS_INLINE +template <typename Char, size_t N> [[nodiscard]] Q_ALWAYS_INLINE constexpr qsizetype lengthHelperContainerLoop(const Char (&str)[N]) { #if defined(__cpp_lib_constexpr_algorithms) && defined(Q_CC_GNU_ONLY) @@ -148,7 +148,7 @@ qsizetype lengthHelperContainerLoop(const Char (&str)[N]) #endif } -template <typename Char, size_t N> [[nodiscard]] constexpr Q_ALWAYS_INLINE +template <typename Char, size_t N> [[nodiscard]] Q_ALWAYS_INLINE constexpr std::enable_if_t<sizeof(Char) == sizeof(char16_t), qsizetype> lengthHelperContainer(const Char (&str)[N]) { diff --git a/src/corelib/text/qstringconverter.cpp b/src/corelib/text/qstringconverter.cpp index 74881f5986b..1c51cf80c20 100644 --- a/src/corelib/text/qstringconverter.cpp +++ b/src/corelib/text/qstringconverter.cpp @@ -64,7 +64,7 @@ enum { Endian = 0, Data = 1 }; static const uchar utf8bom[] = { 0xef, 0xbb, 0xbf }; #if defined(__SSE2__) || defined(__ARM_NEON__) -static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) noexcept +Q_ALWAYS_INLINE static uint qBitScanReverse(unsigned v) noexcept { #if defined(__cpp_lib_int_pow2) && __cpp_lib_int_pow2 >= 202002L return std::bit_width(v) - 1; @@ -80,7 +80,7 @@ static Q_ALWAYS_INLINE uint qBitScanReverse(unsigned v) noexcept #endif #if defined(__SSE2__) -template <QCpuFeatureType Cpu = _compilerCpuFeatures> static Q_ALWAYS_INLINE bool +template <QCpuFeatureType Cpu = _compilerCpuFeatures> Q_ALWAYS_INLINE static bool simdEncodeAscii(uchar *&dst, const char16_t *&nextAscii, const char16_t *&src, const char16_t *end) { size_t sizeBytes = reinterpret_cast<const char *>(end) - reinterpret_cast<const char *>(src); @@ -247,7 +247,7 @@ simdEncodeAscii(uchar *&dst, const char16_t *&nextAscii, const char16_t *&src, c return src == end; } -template <QCpuFeatureType Cpu = _compilerCpuFeatures> static Q_ALWAYS_INLINE bool +template <QCpuFeatureType Cpu = _compilerCpuFeatures> Q_ALWAYS_INLINE static bool simdDecodeAscii(char16_t *&dst, const uchar *&nextAscii, const uchar *&src, const uchar *end) { // do sixteen characters at a time diff --git a/src/corelib/text/qstringliteral.h b/src/corelib/text/qstringliteral.h index 429d9c02ad5..11fa0794deb 100644 --- a/src/corelib/text/qstringliteral.h +++ b/src/corelib/text/qstringliteral.h @@ -25,7 +25,7 @@ using QStringPrivate = QArrayDataPointer<char16_t>; namespace QtPrivate { template <qsizetype N> -static Q_ALWAYS_INLINE QStringPrivate qMakeStringPrivate(const char16_t (&literal)[N]) +Q_ALWAYS_INLINE static QStringPrivate qMakeStringPrivate(const char16_t (&literal)[N]) { // NOLINTNEXTLINE(cppcoreguidelines-pro-type-const-cast) auto str = const_cast<char16_t *>(literal); diff --git a/src/corelib/text/qstringview.h b/src/corelib/text/qstringview.h index 719a8e0b81f..c63ff6fbea1 100644 --- a/src/corelib/text/qstringview.h +++ b/src/corelib/text/qstringview.h @@ -166,7 +166,7 @@ public: #endif template <typename Container, if_compatible_container<Container> = true> - constexpr Q_ALWAYS_INLINE QStringView(const Container &c) noexcept + Q_ALWAYS_INLINE constexpr QStringView(const Container &c) noexcept : QStringView(std::data(c), QtPrivate::lengthHelperContainer(c)) {} template <typename Char, size_t Size, if_compatible_char<Char> = true> |
