diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2018-06-19 22:41:28 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2018-06-23 09:37:46 +0000 |
commit | 42b9b7b5d0fffa3b2c234a4435756141461f6526 (patch) | |
tree | 45ae76b08763fb90494fec59ca52ba316a9d9b35 /src/corelib | |
parent | cad7100fda1b27ba56c4d9efc6bceba62859dfbc (diff) |
QRegularExpression: minor code tidies
Use nullptr, clarify comments.
Change-Id: Ib5f5879d8281cc455635513f82ff8c4bdb951ea8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qregularexpression.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp index 4388fe5712..af2e46dd00 100644 --- a/src/corelib/tools/qregularexpression.cpp +++ b/src/corelib/tools/qregularexpression.cpp @@ -938,7 +938,7 @@ struct QRegularExpressionPrivate : QSharedData // The PCRE code pointer is reference-counted by the QRegularExpressionPrivate // objects themselves; when the private is copied (i.e. a detach happened) - // they are set to 0 + // it is set to nullptr pcre2_code_16 *compiledPattern; int errorCode; int errorOffset; @@ -1007,7 +1007,7 @@ QRegularExpressionPrivate::QRegularExpressionPrivate() patternOptions(0), pattern(), mutex(), - compiledPattern(0), + compiledPattern(nullptr), errorCode(0), errorOffset(-1), capturingCount(0), @@ -1028,8 +1028,8 @@ QRegularExpressionPrivate::~QRegularExpressionPrivate() \internal Copies the private, which means copying only the pattern and the pattern - options. The compiledPattern and the studyData pointers are NOT copied (we - do not own them any more), and in general all the members set when + options. The compiledPattern pointer is NOT copied (we + do not own it any more), and in general all the members set when compiling a pattern are set to default values. isDirty is set back to true so that the pattern has to be recompiled again. */ @@ -1038,7 +1038,7 @@ QRegularExpressionPrivate::QRegularExpressionPrivate(const QRegularExpressionPri patternOptions(other.patternOptions), pattern(other.pattern), mutex(), - compiledPattern(0), + compiledPattern(nullptr), errorCode(0), errorOffset(-1), capturingCount(0), @@ -1053,7 +1053,7 @@ QRegularExpressionPrivate::QRegularExpressionPrivate(const QRegularExpressionPri void QRegularExpressionPrivate::cleanCompiledPattern() { pcre2_code_free_16(compiledPattern); - compiledPattern = 0; + compiledPattern = nullptr; errorCode = 0; errorOffset = -1; capturingCount = 0; |