diff options
Diffstat (limited to 'src/corelib/io/qurlidna.cpp')
-rw-r--r-- | src/corelib/io/qurlidna.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/corelib/io/qurlidna.cpp b/src/corelib/io/qurlidna.cpp index 2305e66407..a2f0caa606 100644 --- a/src/corelib/io/qurlidna.cpp +++ b/src/corelib/io/qurlidna.cpp @@ -1444,7 +1444,7 @@ static void mapToLowerCase(QString *str, int from) { int N = sizeof(NameprepCaseFolding) / sizeof(NameprepCaseFolding[0]); - ushort *d = 0; + ushort *d = nullptr; for (int i = from; i < str->size(); ++i) { uint uc = str->at(i).unicode(); if (uc < 0x80) { @@ -1474,7 +1474,7 @@ static void mapToLowerCase(QString *str, int from) else str->replace(--i, 2, reinterpret_cast<const QChar *>(&entry->mapping[0]), l); i += l - 1; - d = 0; + d = nullptr; } else { if (!d) d = reinterpret_cast<ushort *>(str->data()); @@ -2220,9 +2220,8 @@ Q_AUTOTEST_EXPORT void qt_punycodeEncoder(const QChar *s, int ucLength, QString bool skipped = false; // copy all basic code points verbatim to output. for (uint j = 0; j < (uint) ucLength; ++j) { - ushort js = s[j].unicode(); - if (js < 0x80) - *d++ = js; + if (s[j].unicode() < 0x80) + *d++ = s[j]; else skipped = true; } @@ -2404,7 +2403,7 @@ static const char * const idn_whitelist[] = { }; static const size_t idn_whitelist_size = sizeof idn_whitelist / sizeof *idn_whitelist; -static QStringList *user_idn_whitelist = 0; +static QStringList *user_idn_whitelist = nullptr; static bool lessThan(const QChar *a, int l, const char *c) { |