]> git.lyx.org Git - lyx.git/blobdiff - src/support/unicode.cpp
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / support / unicode.cpp
index 001ec948ae70cc34c1137df60fcdb0be493a49f9..d84d81ac3dcde6a0f4fcdb614715dc7fa229a47d 100644 (file)
@@ -51,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 << ')');
@@ -107,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;
@@ -252,8 +252,8 @@ IconvProcessor & getProc(map<string, IconvProcessor> & processors,
        if (it == processors.end()) {
                IconvProcessor p(fromcode, tocode);
                return processors.insert(make_pair(encoding, move(p))).first->second;
-       } else
-               return it->second;
+       }
+       return it->second;
 }
 
 } // namespace