X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsupport%2Funicode.cpp;h=5ea21aad0520cf231abf81c9b7eeb64e26f8e192;hb=c6b17b7094c42ff6bf96e3452f69023c724d15b7;hp=ecc415b2f351d8571f71184956f1a66becacd547;hpb=22f599250e926555bdef0d50ee2198b3eb2da02a;p=lyx.git diff --git a/src/support/unicode.cpp b/src/support/unicode.cpp index ecc415b2f3..5ea21aad05 100644 --- a/src/support/unicode.cpp +++ b/src/support/unicode.cpp @@ -19,9 +19,8 @@ #include -#include - #include +#include #include #include //Needed in MSVC @@ -52,7 +51,7 @@ namespace lyx { struct IconvProcessor::Handler { // assumes cd is valid - Handler(iconv_t const cd) : cd(cd) {} + explicit Handler(iconv_t const cd) : cd(cd) {} ~Handler() { if (iconv_close(cd) == -1) LYXERR0("Error returned from iconv_close(" << errno << ')'); @@ -108,7 +107,7 @@ int IconvProcessor::convert(char const * buf, size_t buflen, // flush out remaining data. This is needed because iconv sometimes // holds back chars in the stream, waiting for a combination character // (see e.g. http://sources.redhat.com/bugzilla/show_bug.cgi?id=1124) - iconv(h_->cd, NULL, NULL, &outbuf, &outbytesleft); + iconv(h_->cd, nullptr, nullptr, &outbuf, &outbytesleft); //lyxerr << dec; //lyxerr << "Inbytesleft: " << inbytesleft << endl; @@ -136,7 +135,7 @@ int IconvProcessor::convert(char const * buf, size_t buflen, for (size_t i = 0; i < buflen; ++i) { // char may be signed, avoid output of // something like 0xffffffc2 - boost::uint32_t const b = + uint32_t const b = *reinterpret_cast(buf + i); lyxerr << " 0x" << (unsigned int)b; }