diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:41:00 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2009-07-25 08:41:00 (GMT) |
commit | 2d8716756ef648dcb34d7493d145360a0e029393 (patch) | |
tree | 5da1f346d36d5ae215d84889783e5cb2f076b1d3 /src/corelib | |
parent | f2e4c961b3dc6b6e0713ffe75209ab5661e53dd6 (diff) | |
download | Qt-2d8716756ef648dcb34d7493d145360a0e029393.zip Qt-2d8716756ef648dcb34d7493d145360a0e029393.tar.gz Qt-2d8716756ef648dcb34d7493d145360a0e029393.tar.bz2 |
Fix warnings when compiling Qt (tst_warnings).
Don't use old-style casts in Qt code. And avoid signed/unsigned
comparisons (sizeof returns size_t, which is unsigned).
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/tools/qstringbuilder.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qstringbuilder.h b/src/corelib/tools/qstringbuilder.h index 3b43253..463c32d 100644 --- a/src/corelib/tools/qstringbuilder.h +++ b/src/corelib/tools/qstringbuilder.h @@ -163,7 +163,7 @@ template <> struct QConcatenable<QString> static inline void appendTo(const QString &a, QChar *&out) { const int n = a.size(); - memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n); out += n; } }; @@ -175,7 +175,7 @@ template <> struct QConcatenable<QStringRef> static inline void appendTo(QStringRef a, QChar *&out) { const int n = a.size(); - memcpy(out, (char*)a.constData(), sizeof(QChar) * n); + memcpy(out, reinterpret_cast<const char*>(a.constData()), sizeof(QChar) * n); out += n; } }; |