X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fstringcodec%2Fjisx0208.h;h=39412825078889fb526e0d4a7ec84a796dc5983a;hb=41363aed34382386f915f17c1a961750b4fdcb14;hp=c8e69446b615084fb7406d9a7880225181ecfd62;hpb=c7afef88380ebebc8c2b04e48664d73281ec8848;p=libs%2Fcore.git diff --git a/source/stringcodec/jisx0208.h b/source/stringcodec/jisx0208.h index c8e6944..3941282 100644 --- a/source/stringcodec/jisx0208.h +++ b/source/stringcodec/jisx0208.h @@ -17,7 +17,7 @@ public: class Encoder: public Codec::Encoder { public: - Encoder(ErrorMode em = THROW_ON_ERROR): Codec::Encoder(em) { } + Encoder(ErrorMode em = DEFAULT): Codec::Encoder(em) { } virtual void encode_char(unichar, std::string &); private: @@ -27,12 +27,12 @@ public: class Decoder: public Codec::Decoder { public: - Decoder(ErrorMode em = THROW_ON_ERROR): Codec::Decoder(em) { } + Decoder(ErrorMode em = DEFAULT): Codec::Decoder(em) { } virtual unichar decode_char(const std::string &, std::string::const_iterator &); }; - JisX0208(ErrorMode em = THROW_ON_ERROR): StandardCodec(em) { } + JisX0208(ErrorMode em = DEFAULT): StandardCodec(em) { } virtual const char *get_name() const { return "JIS X 0208"; } }; @@ -40,12 +40,10 @@ public: struct Kuten { - unsigned short ku; - unsigned short ten; + unsigned short ku = 0; + unsigned short ten = 0; - Kuten(): ku(0), ten(0) { } - - operator bool() { return ku!=0 && ten!=0; } + explicit operator bool() { return ku!=0 && ten!=0; } }; unichar jisx0208_to_ucs(Kuten);