diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-05-14 15:04:18 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-06-07 17:19:16 +0200 |
commit | b4ead572501179244aa036e7a590fa7536929f2b (patch) | |
tree | f1e706b221e78e294b3169965c005df768730203 /src/corelib/tools/qbytearraymatcher.cpp | |
parent | 327bfdb671e0e263c6fb027133a54985a65194c4 (diff) |
Move away from using 0 as a pointer constant
Cleans up most of corelib to use nullptr or default enums
where appropriate.
Change-Id: Ifcaac14ecdaaee730f87f10941db3ce407d71ef9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qbytearraymatcher.cpp')
-rw-r--r-- | src/corelib/tools/qbytearraymatcher.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp index d2eb4e0e3c..72e09226af 100644 --- a/src/corelib/tools/qbytearraymatcher.cpp +++ b/src/corelib/tools/qbytearraymatcher.cpp @@ -116,9 +116,9 @@ static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, u Call setPattern() to give it a pattern to match. */ QByteArrayMatcher::QByteArrayMatcher() - : d(0) + : d(nullptr) { - p.p = 0; + p.p = nullptr; p.l = 0; memset(p.q_skiptable, 0, sizeof(p.q_skiptable)); } @@ -129,7 +129,7 @@ QByteArrayMatcher::QByteArrayMatcher() the destructor does not delete \a pattern. */ QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length) - : d(0) + : d(nullptr) { p.p = reinterpret_cast<const uchar *>(pattern); p.l = length; @@ -141,7 +141,7 @@ QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length) Call indexIn() to perform a search. */ QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern) - : d(0), q_pattern(pattern) + : d(nullptr), q_pattern(pattern) { p.p = reinterpret_cast<const uchar *>(pattern.constData()); p.l = pattern.size(); @@ -152,7 +152,7 @@ QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern) Copies the \a other byte array matcher to this byte array matcher. */ QByteArrayMatcher::QByteArrayMatcher(const QByteArrayMatcher &other) - : d(0) + : d(nullptr) { operator=(other); } |