]> git.tdb.fi Git - libs/core.git/blobdiff - source/stringcodec/iso2022jp.cpp
Mark constructors and destructors as default where appropriate
[libs/core.git] / source / stringcodec / iso2022jp.cpp
index 14a4b99f83196b835b44eba00afb51082760d37a..3332922ccda68e81d354ca5f4e25f35bc96f492c 100644 (file)
@@ -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);
        }
 }
@@ -78,7 +80,6 @@ void Iso2022Jp::Encoder::transliterate(unichar, string &buf)
 
 Iso2022Jp::Decoder::Decoder(ErrorMode em):
        Codec::Decoder(em),
-       mode(ASCII),
        dec(new Ascii::Decoder)
 { }
 
@@ -89,7 +90,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)