summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-01-28 16:41:13 (GMT)
committerOswald Buddenhagen <oswald.buddenhagen@nokia.com>2010-02-01 12:59:14 (GMT)
commit3c0370bd3d0ee83b84ea7c1cc579be51768df183 (patch)
treec9336c575e5fd51a5437215d1e1c64114a2d0e04 /src
parent0d772fe5d362861c0b59374a25ec4d0e0ba05181 (diff)
downloadQt-3c0370bd3d0ee83b84ea7c1cc579be51768df183.zip
Qt-3c0370bd3d0ee83b84ea7c1cc579be51768df183.tar.gz
Qt-3c0370bd3d0ee83b84ea7c1cc579be51768df183.tar.bz2
remove pointless conditionals
we already know that (endian == DetectEndianness) - we tested it 1 resp 3 lines above ... Reviewed-By: denis
Diffstat (limited to 'src')
-rw-r--r--src/corelib/codecs/qutfcodec.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/corelib/codecs/qutfcodec.cpp b/src/corelib/codecs/qutfcodec.cpp
index f88fa8d..7655c51 100644
--- a/src/corelib/codecs/qutfcodec.cpp
+++ b/src/corelib/codecs/qutfcodec.cpp
@@ -328,10 +328,9 @@ QString QUtf16::convertToUnicode(const char *chars, int len, QTextCodec::Convert
if (!headerdone) {
headerdone = true;
if (endian == DetectEndianness) {
- if (ch == QChar::ByteOrderSwapped && endian != BigEndianness) {
+ if (ch == QChar::ByteOrderSwapped) {
endian = LittleEndianness;
- } else if (ch == QChar::ByteOrderMark && endian != LittleEndianness) {
- // ignore BOM
+ } else if (ch == QChar::ByteOrderMark) {
endian = BigEndianness;
} else {
if (QSysInfo::ByteOrder == QSysInfo::BigEndian) {