summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qstring.cpp
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2020-04-21 16:30:32 +0200
committerMarc Mutz <marc.mutz@kdab.com>2020-04-26 13:46:18 +0200
commit4ba25a092065a6422510a9f4afa4fbbabeda686c (patch)
treeb89e0109e4bddc22f70a872f72cb462305989f50 /src/corelib/text/qstring.cpp
parent19bfcdaa43f6ac8841942cb545811eab409f1713 (diff)
QStringIterator: port from uint to char32_t
Change-Id: I0ca47b87216478b28e29b0fa1a118ef13b6d7c84 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Diffstat (limited to 'src/corelib/text/qstring.cpp')
-rw-r--r--src/corelib/text/qstring.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/text/qstring.cpp b/src/corelib/text/qstring.cpp
index fa61b5939d6..cffcf6575b7 100644
--- a/src/corelib/text/qstring.cpp
+++ b/src/corelib/text/qstring.cpp
@@ -593,11 +593,11 @@ bool QtPrivate::isLatin1(QStringView s) noexcept
bool QtPrivate::isValidUtf16(QStringView s) noexcept
{
- Q_CONSTEXPR uint InvalidCodePoint = UINT_MAX;
+ Q_CONSTEXPR char32_t InvalidCodePoint = UINT_MAX;
QStringIterator i(s);
while (i.hasNext()) {
- uint c = i.next(InvalidCodePoint);
+ const auto c = i.next(InvalidCodePoint);
if (c == InvalidCodePoint)
return false;
}
@@ -5077,7 +5077,7 @@ bool QString::isUpper() const
QStringIterator it(*this);
while (it.hasNext()) {
- uint uc = it.nextUnchecked();
+ const auto uc = it.nextUnchecked();
if (qGetProp(uc)->cases[QUnicodeTables::UpperCase].diff)
return false;
}
@@ -5103,7 +5103,7 @@ bool QString::isLower() const
QStringIterator it(*this);
while (it.hasNext()) {
- uint uc = it.nextUnchecked();
+ const auto uc = it.nextUnchecked();
if (qGetProp(uc)->cases[QUnicodeTables::LowerCase].diff)
return false;
}
@@ -6546,7 +6546,7 @@ static QString detachAndConvertCase(T &str, QStringIterator it, QUnicodeTables::
QChar *pp = s.begin() + it.index(); // will detach if necessary
do {
- uint uc = it.nextUnchecked();
+ auto uc = it.nextUnchecked();
const auto fold = qGetProp(uc)->cases[which];
signed short caseDiff = fold.diff;
@@ -6594,7 +6594,7 @@ static QString convertCase(T &str, QUnicodeTables::Case which)
QStringIterator it(p, e);
while (it.hasNext()) {
- uint uc = it.nextUnchecked();
+ const auto uc = it.nextUnchecked();
if (qGetProp(uc)->cases[which].diff) {
it.recedeUnchecked();
return detachAndConvertCase(str, it, which);