diff options
author | hjk <qtc-committer@nokia.com> | 2009-06-18 15:01:09 (GMT) |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-06-19 06:39:38 (GMT) |
commit | 9a5b40a011bd1b15a67d83564af55011761f8ad9 (patch) | |
tree | ba99ee4cccb04c1c19512995eb26edc7638aa6ba /src/corelib/codecs/qfontlaocodec.cpp | |
parent | cce29e63108827f551c74221d0aafbbba891dd51 (diff) | |
download | Qt-9a5b40a011bd1b15a67d83564af55011761f8ad9.zip Qt-9a5b40a011bd1b15a67d83564af55011761f8ad9.tar.gz Qt-9a5b40a011bd1b15a67d83564af55011761f8ad9.tar.bz2 |
Small speedup of construction of uninitialized QByteArrays
Directly construct uninitialized QByteArrays of required size
instead of default-constructing one and resizing it afterwards.
Reviewed-by: mariusSO
Diffstat (limited to 'src/corelib/codecs/qfontlaocodec.cpp')
-rw-r--r-- | src/corelib/codecs/qfontlaocodec.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/corelib/codecs/qfontlaocodec.cpp b/src/corelib/codecs/qfontlaocodec.cpp index 85017e0..6dd87de 100644 --- a/src/corelib/codecs/qfontlaocodec.cpp +++ b/src/corelib/codecs/qfontlaocodec.cpp @@ -97,8 +97,7 @@ QString QFontLaoCodec::convertToUnicode(const char *, int, ConverterState *) con QByteArray QFontLaoCodec::convertFromUnicode(const QChar *uc, int len, ConverterState *) const { - QByteArray rstring; - rstring.resize(len); + QByteArray rstring(len, Qt::Uninitialized); uchar *rdata = (uchar *) rstring.data(); const QChar *sdata = uc; int i = 0; |