From d7b720dd3ee7a095abe7e283d1bed881268b0f5e Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sun, 19 Feb 2012 23:58:04 +0100 Subject: QRegularExpression: const correctness fixes Adding some const qualifiers to members which are never written. Change-Id: Ibb8953764c7b7790a419a5d48f2956751d5fc1f9 Reviewed-by: Thiago Macieira --- src/corelib/tools/qregularexpression.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp index 7bbac0144b..40b6b5a08e 100644 --- a/src/corelib/tools/qregularexpression.cpp +++ b/src/corelib/tools/qregularexpression.cpp @@ -817,14 +817,14 @@ struct QRegularExpressionMatchPrivate : QSharedData QRegularExpressionMatch nextMatch() const; - QRegularExpression regularExpression; - QString subject; + const QRegularExpression regularExpression; + const QString subject; // the capturedOffsets vector contains pairs of (start, end) positions // for each captured substring QVector capturedOffsets; - QRegularExpression::MatchType matchType; - QRegularExpression::MatchOptions matchOptions; + const QRegularExpression::MatchType matchType; + const QRegularExpression::MatchOptions matchOptions; int capturedCount; @@ -835,16 +835,16 @@ struct QRegularExpressionMatchPrivate : QSharedData struct QRegularExpressionMatchIteratorPrivate : QSharedData { - QRegularExpressionMatchIteratorPrivate(const QRegularExpression re, + QRegularExpressionMatchIteratorPrivate(const QRegularExpression &re, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions, const QRegularExpressionMatch &next); bool hasNext() const; QRegularExpressionMatch next; - QRegularExpression regularExpression; - QRegularExpression::MatchType matchType; - QRegularExpression::MatchOptions matchOptions; + const QRegularExpression regularExpression; + const QRegularExpression::MatchType matchType; + const QRegularExpression::MatchOptions matchOptions; }; /*! @@ -1216,7 +1216,7 @@ QRegularExpressionMatch QRegularExpressionMatchPrivate::nextMatch() const /*! \internal */ -QRegularExpressionMatchIteratorPrivate::QRegularExpressionMatchIteratorPrivate(const QRegularExpression re, +QRegularExpressionMatchIteratorPrivate::QRegularExpressionMatchIteratorPrivate(const QRegularExpression &re, QRegularExpression::MatchType matchType, QRegularExpression::MatchOptions matchOptions, const QRegularExpressionMatch &next) -- cgit v1.2.3