diff options
author | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-01-28 16:38:17 (GMT) |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@nokia.com> | 2010-02-01 12:59:13 (GMT) |
commit | 0d772fe5d362861c0b59374a25ec4d0e0ba05181 (patch) | |
tree | 4af627efb64bad7ffc24648a495f823d6a340190 /src/corelib | |
parent | c830656616977d417972e2497ff3135bc562a660 (diff) | |
download | Qt-0d772fe5d362861c0b59374a25ec4d0e0ba05181.zip Qt-0d772fe5d362861c0b59374a25ec4d0e0ba05181.tar.gz Qt-0d772fe5d362861c0b59374a25ec4d0e0ba05181.tar.bz2 |
micro-optimization
move up the headerdone setting, so the compiler can do tail-merging of
the branches
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/codecs/qutfcodec.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp index f7d3b06..f88fa8d 100644 --- a/src/corelib/codecs/qutfcodec.cpp +++ b/src/corelib/codecs/qutfcodec.cpp @@ -326,6 +326,7 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert ch.setCell(*chars++); } if (!headerdone) { + headerdone = true; if (endian == DetectEndianness) { if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) { endian = LittleEndianness; @@ -344,7 +345,6 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert } else if (ch != QChar::ByteOrderMark) { *qch++ = ch; } - headerdone = true; } else { *qch++ = ch; } |