Kaydet (Commit) faf46e49 authored tarafından Herbert Dürr's avatar Herbert Dürr

WaE: fix narrowing conversion for systems with signed char

üst 267c782f
...@@ -263,13 +263,8 @@ void Export::RemoveUTF8ByteOrderMarker( ByteString &rString ){ ...@@ -263,13 +263,8 @@ void Export::RemoveUTF8ByteOrderMarker( ByteString &rString ){
} }
bool Export::hasUTF8ByteOrderMarker( const ByteString &rString ){ bool Export::hasUTF8ByteOrderMarker( const ByteString &rString ){
// Byte order marker signature // UTF-8 BOM: Byte order marker signature
static const unsigned char bom[3] = { 0xEF, 0xBB, 0xBF };
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 && return rString.Len() >= 3 &&
rString.GetChar( 0 ) == bom[ 0 ] && rString.GetChar( 0 ) == bom[ 0 ] &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment