summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2011-10-18 23:05:58 +0200
committerStephan Bergmann <sbergman@redhat.com>2011-10-18 23:10:56 +0200
commitbf1f0183d5c6b4c94acdbee27276d5a386a657f4 (patch)
tree3d4d60a59f935ee11011ebea33ccb6d9fab5063c /l10ntools
parent0eee1cf957d122ac0d805a9589a5db075a94e4a1 (diff)
Some fixes for "clang version 3.1 (trunk 142234)" (with --enable-werror, on Linux x86_64).
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/export2.cxx14
1 files changed, 3 insertions, 11 deletions
diff --git a/l10ntools/source/export2.cxx b/l10ntools/source/export2.cxx
index 60ca704c44f8..26f99b59e7c8 100644
--- a/l10ntools/source/export2.cxx
+++ b/l10ntools/source/export2.cxx
@@ -198,18 +198,10 @@ void Export::RemoveUTF8ByteOrderMarker( ByteString &rString ){
}
bool Export::hasUTF8ByteOrderMarker( const ByteString &rString ){
- // Byte order marker signature
-
- const unsigned char c1 = 0xEF;
- const unsigned char c2 = 0xBB;
- const unsigned char c3 = 0xBF;
-
- const char bom[ 3 ] = { c1 , c2 , c3 };
-
return rString.Len() >= 3 &&
- rString.GetChar( 0 ) == bom[ 0 ] &&
- rString.GetChar( 1 ) == bom[ 1 ] &&
- rString.GetChar( 2 ) == bom[ 2 ] ;
+ rString.GetChar( 0 ) == '\xEF' &&
+ rString.GetChar( 1 ) == '\xBB' &&
+ rString.GetChar( 2 ) == '\xBF' ;
}
bool Export::fileHasUTF8ByteOrderMarker( const ByteString &rString ){
SvFileStream aFileIn( String( rString , RTL_TEXTENCODING_ASCII_US ) , STREAM_READ );