diff options
-rw-r--r-- | src/corelib/text/qbytearray.cpp | 4 | ||||
-rw-r--r-- | src/corelib/text/qbytearray.h | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/text/qbytearray.cpp b/src/corelib/text/qbytearray.cpp index 16672683e96..b5894da8bb5 100644 --- a/src/corelib/text/qbytearray.cpp +++ b/src/corelib/text/qbytearray.cpp @@ -2538,7 +2538,7 @@ qsizetype QtPrivate::count(QByteArrayView haystack, QByteArrayView needle) noexc return num; } -/*! \fn qsizetype QByteArray::count(QByteArrayView &bv) const +/*! \fn qsizetype QByteArray::count(QByteArrayView bv) const \since 6.0 Returns the number of (potentially overlapping) occurrences of the @@ -2568,7 +2568,7 @@ qsizetype QByteArray::count(char ch) const */ /*! - \fn int QByteArray::compare(const QByteArrayView &bv, Qt::CaseSensitivity cs = Qt::CaseSensitive) const + \fn int QByteArray::compare(QByteArrayView bv, Qt::CaseSensitivity cs = Qt::CaseSensitive) const \since 6.0 Returns an integer less than, equal to, or greater than zero depending on diff --git a/src/corelib/text/qbytearray.h b/src/corelib/text/qbytearray.h index 6ba078f329d..36719aafd71 100644 --- a/src/corelib/text/qbytearray.h +++ b/src/corelib/text/qbytearray.h @@ -210,10 +210,10 @@ public: inline bool contains(char c) const; inline bool contains(QByteArrayView bv) const; qsizetype count(char c) const; - qsizetype count(const QByteArrayView &bv) const + qsizetype count(QByteArrayView bv) const { return QtPrivate::count(qToByteArrayViewIgnoringNull(*this), bv); } - inline int compare(const QByteArrayView &a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept; + inline int compare(QByteArrayView a, Qt::CaseSensitivity cs = Qt::CaseSensitive) const noexcept; Q_REQUIRED_RESULT QByteArray left(qsizetype len) const; Q_REQUIRED_RESULT QByteArray right(qsizetype len) const; @@ -552,7 +552,7 @@ inline bool QByteArray::contains(char c) const { return indexOf(c) != -1; } inline bool QByteArray::contains(QByteArrayView bv) const { return indexOf(bv) != -1; } -inline int QByteArray::compare(const QByteArrayView &a, Qt::CaseSensitivity cs) const noexcept +inline int QByteArray::compare(QByteArrayView a, Qt::CaseSensitivity cs) const noexcept { return cs == Qt::CaseSensitive ? QtPrivate::compareMemory(*this, a) : qstrnicmp(data(), size(), a.data(), a.size()); |