diff options
author | hjk <qtc-committer@nokia.com> | 2009-06-18 14:02:00 (GMT) |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-06-18 14:29:53 (GMT) |
commit | e356eed2fa3d8e62085d6bd72caba9d11c40bacf (patch) | |
tree | 4411d57e71015f65fbdc631680271caefb8a0c3e /src/corelib/codecs/qutfcodec.cpp | |
parent | d7005487b789e2bc5a1400148b4f317142a381ac (diff) | |
download | Qt-e356eed2fa3d8e62085d6bd72caba9d11c40bacf.zip Qt-e356eed2fa3d8e62085d6bd72caba9d11c40bacf.tar.gz Qt-e356eed2fa3d8e62085d6bd72caba9d11c40bacf.tar.bz2 |
Don't initialize data that will be overwritten immediately.
Reviewed-by: mariusSO
Diffstat (limited to 'src/corelib/codecs/qutfcodec.cpp')
-rw-r--r-- | src/corelib/codecs/qutfcodec.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index 12575f9..fe826ad 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -351,8 +351,7 @@ QString QUtf16Codec::convertToUnicode(const char *chars, int len, ConverterState if (headerdone && endian == Detect) endian = (QSysInfo::ByteOrder == QSysInfo::BigEndian) ? BE : LE; - QString result; - result.resize(len); // worst case + QString result(len, Qt::Uninitialized); // worst case QChar *qch = (QChar *)result.unicode(); while (len--) { if (half) { |