diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2011-11-16 09:07:24 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-17 16:13:49 +0100 |
commit | fc6ba401d204c67b707ba8b8bd74c9e958454866 (patch) | |
tree | fe865a18f71004e4a81af22a3a1f40047a8595ea /src/corelib/tools | |
parent | 585b5e95e3c6191d3e298bb5713ed0cb96723bc8 (diff) |
Fix tst_Moc::oldStyleCasts
This tests that the moc generated file produces no warnings with very
pedentic compilation flags.
In that case, there was a warning because of the use of the C casts
Change-Id: Ie79c6d053ff35c55276a07212c5d60f759f693ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'src/corelib/tools')
-rw-r--r-- | src/corelib/tools/qstring.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h index 0688b98ddd..4e1e67bfa6 100644 --- a/src/corelib/tools/qstring.h +++ b/src/corelib/tools/qstring.h @@ -782,8 +782,8 @@ inline int QString::toWCharArray(wchar_t *array) const } inline QString QString::fromWCharArray(const wchar_t *string, int size) { - return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16((const ushort *)string, size) - : fromUcs4((uint *)string, size); + return sizeof(wchar_t) == sizeof(QChar) ? fromUtf16(reinterpret_cast<const ushort *>(string), size) + : fromUcs4(reinterpret_cast<const uint *>(string), size); } |