diff options
Diffstat (limited to 'src/corelib/codecs/qisciicodec.cpp')
-rw-r--r-- | src/corelib/codecs/qisciicodec.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/corelib/codecs/qisciicodec.cpp b/src/corelib/codecs/qisciicodec.cpp index a33fd0d..c054313 100644 --- a/src/corelib/codecs/qisciicodec.cpp +++ b/src/corelib/codecs/qisciicodec.cpp @@ -187,8 +187,7 @@ QByteArray QIsciiCodec::convertFromUnicode(const QChar *uc, int len, ConverterSt } int invalid = 0; - QByteArray result; - result.resize(2*len); //worst case + QByteArray result(2 * len, Qt::Uninitialized); //worst case uchar *ch = reinterpret_cast<uchar *>(result.data()); @@ -250,8 +249,7 @@ QString QIsciiCodec::convertToUnicode(const char* chars, int len, ConverterState halant = state->state_data[0]; } - QString result; - result.resize(len); + QString result(len, Qt::Uninitialized); QChar *uc = result.data(); const int base = codecs[idx].base; |