From 0d772fe5d362861c0b59374a25ec4d0e0ba05181 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 28 Jan 2010 17:38:17 +0100 Subject: micro-optimization move up the headerdone setting, so the compiler can do tail-merging of the branches --- src/corelib/codecs/qutfcodec.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v0.12