summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qbytearraymatcher.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/tools/qbytearraymatcher.cpp')
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index a54afc5a9d..d2eb4e0e3c 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -356,9 +356,7 @@ int qFindByteArray(
value of that function in a \c{static const auto} variable, so you don't need
to pass the \c{N} template parameter explicitly:
- \code
- static const auto matcher = qMakeStaticByteArrayMatcher("needle");
- \endcode
+ \snippet code/src_corelib_tools_qbytearraymatcher.cpp 0
Then call indexIn() on the QByteArray in which you want to search, just like
with QByteArrayMatcher.
@@ -406,7 +404,7 @@ int qFindByteArray(
/*!
\internal
*/
-int QStaticByteArrayMatcherBase::indexOfIn(const char *needle, uint nlen, const char *haystack, int hlen, int from) const Q_DECL_NOTHROW
+int QStaticByteArrayMatcherBase::indexOfIn(const char *needle, uint nlen, const char *haystack, int hlen, int from) const noexcept
{
if (from < 0)
from = 0;
@@ -430,9 +428,7 @@ int QStaticByteArrayMatcherBase::indexOfIn(const char *needle, uint nlen, const
To take full advantage of this function, assign the result to an
\c{auto} variable:
- \code
- static const auto matcher = qMakeStaticByteArrayMatcher("needle");
- \endcode
+ \snippet code/src_corelib_tools_qbytearraymatcher.cpp 1
*/