summaryrefslogtreecommitdiffstats
path: root/src/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'src/codecs')
-rw-r--r--src/codecs/qjpunicode.cpp4
-rw-r--r--src/codecs/qtextcodec.cpp2
-rw-r--r--src/codecs/qutfcodec.cpp4
3 files changed, 5 insertions, 5 deletions
diff --git a/src/codecs/qjpunicode.cpp b/src/codecs/qjpunicode.cpp
index 2d9033f..4b3beaf 100644
--- a/src/codecs/qjpunicode.cpp
+++ b/src/codecs/qjpunicode.cpp
@@ -10555,7 +10555,7 @@ uint QJpUnicodeConv::unicodeToSjisibmvdc(uint h, uint l) const
if (!sjis208ibmvdc_unicode[i])
return 0;
if (u==sjis208ibmvdc_unicode[i]){
- return ((0x00fa +(i/189))<<8 | 0x0040+(i%189));
+ return ((0x00fa +(i/189))<<8 | (0x0040+(i%189)));
}
}
}
@@ -10660,7 +10660,7 @@ uint QJpUnicodeConv::unicodeToCp932(uint h, uint l) const
if (!cp932_ed_ee_unicode[j])
return 0;
if (u==cp932_ed_ee_unicode[j]){
- return ((0x00ed +(j/189))<<8 | 0x0040+(j%189));
+ return ((0x00ed +(j/189))<<8 | (0x0040+(j%189)));
}
}
}
diff --git a/src/codecs/qtextcodec.cpp b/src/codecs/qtextcodec.cpp
index 1a4fb32..80d0093 100644
--- a/src/codecs/qtextcodec.cpp
+++ b/src/codecs/qtextcodec.cpp
@@ -2844,7 +2844,7 @@ static void setupLocaleMapper()
localeMapper = checkForCodec( lang );
// 5. "@euro"
- if ( !localeMapper && ctype && strstr( ctype, "@euro" ) || lang && strstr( lang, "@euro" ) )
+ if ( ( !localeMapper && ctype && strstr( ctype, "@euro" ) ) || (lang && strstr( lang, "@euro" ) ) )
localeMapper = QTextCodec::codecForName( "ISO 8859-15" );
// 6. guess locale from ctype unless ctype is "C"
diff --git a/src/codecs/qutfcodec.cpp b/src/codecs/qutfcodec.cpp
index bc1abce..4e02fe5 100644
--- a/src/codecs/qutfcodec.cpp
+++ b/src/codecs/qutfcodec.cpp
@@ -254,8 +254,8 @@ const char* QUtf16Codec::name() const
int QUtf16Codec::heuristicContentMatch(const char* chars, int len) const
{
uchar* uchars = (uchar*)chars;
- if ( len >= 2 && (uchars[0] == 0xff && uchars[1] == 0xfe ||
- uchars[1] == 0xff && uchars[0] == 0xfe) )
+ if ( len >= 2 && ((uchars[0] == 0xff && uchars[1] == 0xfe) ||
+ (uchars[1] == 0xff && uchars[0] == 0xfe)) )
return len;
else
return 0;