X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstringcodec%2Fiso2022jp.cpp;h=296c1efe1ed479bd930a8b7f768d87b9a970d010;hb=8223c2aabe26469b6c580a223555496c5c5c5df5;hp=14a4b99f83196b835b44eba00afb51082760d37a;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848;p=libs%2Fcore.git diff --git a/source/stringcodec/iso2022jp.cpp b/source/stringcodec/iso2022jp.cpp index 14a4b99..296c1ef 100644 --- a/source/stringcodec/iso2022jp.cpp +++ b/source/stringcodec/iso2022jp.cpp @@ -40,7 +40,9 @@ void Iso2022Jp::Encoder::encode_char(unichar ch, string &buf) if(mode!=JISX0208) switch_mode(JISX0208, buf); - char jbuf[2] = { jis.ku+0x20, jis.ten+0x20 }; + char jbuf[2]; + jbuf[0] = jis.ku+0x20; + jbuf[1] = jis.ten+0x20; buf.append(jbuf, 2); } } @@ -89,7 +91,7 @@ unichar Iso2022Jp::Decoder::decode_char(const string &str, string::const_iterato while(i!=str.end()) { - string::const_iterator j = i; + auto j = i; unichar result = -1; if(*j==033)