X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstringcodec%2Futf16.cpp;h=f8ae093a64e8e67d16a9e9897dd5e3e13063b4a6;hb=122846f0881673770d88eff7d925ecf25c01b62e;hp=09fb3b6f76c80a214b882bbf105405b68a5ec9a2;hpb=20c897ece781e18ba54c41fd68e232ce566a938d;p=libs%2Fcore.git diff --git a/source/stringcodec/utf16.cpp b/source/stringcodec/utf16.cpp index 09fb3b6..f8ae093 100644 --- a/source/stringcodec/utf16.cpp +++ b/source/stringcodec/utf16.cpp @@ -7,8 +7,7 @@ namespace StringCodec { Utf16::Encoder::Encoder(ErrorMode em, Endian en): Codec::Encoder(em), - endian(en==AUTO ? BIG : en), - emit_bom(true) + endian(en==AUTO ? BIG : en) { } void Utf16::Encoder::encode_char(unichar ch, string &buf) @@ -66,7 +65,7 @@ unichar Utf16::Decoder::decode_char(const string &str, string::const_iterator &i if(i==str.end()) return -1; - string::const_iterator j = i; + auto j = i; unichar unit = decode_unit(str, i, j); if(unit!=-1) @@ -97,7 +96,7 @@ unichar Utf16::Decoder::decode_char(const string &str, string::const_iterator &i { if(unit>=0xD800 && unit<=0xDBFF) { - string::const_iterator k = j; + auto k = j; unichar unit2 = -2; if(k!=str.end())