summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qstring.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-06-15 11:49:45 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-17 09:44:22 +0200
commitd9fb6e6dbb2b322556d581265da2442e3b91a6a3 (patch)
tree8d5ae465adf4db8468c7e0ff1d91113594cb45aa /src/corelib/tools/qstring.cpp
parentd9e722d8560c07adb1852cfd061ffb23197d06fd (diff)
Remove use of 'register' from Qt.
It is deprecated and clang is starting to warn about it. Patch mostly generated by clang itself, with some careful grep and sed for the platform-specific parts. Change-Id: I8058e6db0f1b41b33a9e8f17a712739159982450 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qstring.cpp')
-rw-r--r--src/corelib/tools/qstring.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 54b1a084b2..de09e5bbe0 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -266,7 +266,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
if (a == b || !length)
return true;
- register union {
+ union {
const quint16 *w;
const quint32 *d;
quintptr value;
@@ -291,7 +291,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
// both addresses are 4-bytes aligned
// do a fast 32-bit comparison
- register const quint32 *e = sa.d + (length >> 1);
+ const quint32 *e = sa.d + (length >> 1);
for ( ; sa.d != e; ++sa.d, ++sb.d) {
if (*sa.d != *sb.d)
return false;
@@ -301,7 +301,7 @@ static bool qMemEquals(const quint16 *a, const quint16 *b, int length)
return (length & 1) ? *sa.w == *sb.w : true;
} else {
// one of the addresses isn't 4-byte aligned but the other is
- register const quint16 *e = sa.w + length;
+ const quint16 *e = sa.w + length;
for ( ; sa.w != e; ++sa.w, ++sb.w) {
if (*sa.w != *sb.w)
return false;
@@ -4908,8 +4908,8 @@ int QString::compare_helper(const QChar *data1, int length1, const QChar *data2,
{
if (cs == Qt::CaseSensitive)
return ucstrcmp(data1, length1, data2, length2);
- register const ushort *s1 = reinterpret_cast<const ushort *>(data1);
- register const ushort *s2 = reinterpret_cast<const ushort *>(data2);
+ const ushort *s1 = reinterpret_cast<const ushort *>(data1);
+ const ushort *s2 = reinterpret_cast<const ushort *>(data2);
return ucstricmp(s1, s1 + length1, s2, s2 + length2);
}