]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Use Common Number separator instead of European to detect numbers
[lyx.git] / src / Encoding.cpp
index ad380d78039d69f83ffa048bb14b3ed9a54c51b5..b24c31366fe6d800094422302c5debbac5d517c6 100644 (file)
 #include "support/textutils.h"
 #include "support/unicode.h"
 
-#include <boost/cstdint.hpp>
-
-#include <iterator>
 #include <algorithm>
+#include <cstdint>
+#include <iterator>
 #include <sstream>
 
 using namespace std;
@@ -68,7 +67,7 @@ EncodingException::EncodingException(char_type c)
 }
 
 
-const char * EncodingException::what() const throw()
+const char * EncodingException::what() const noexcept
 {
        return "Could not find LaTeX command for a character";
 }
@@ -275,7 +274,7 @@ vector<char_type> Encoding::symbolsList() const
        // add all encodable characters
        copy(encodable_.begin(), encodable_.end(), back_inserter(symbols));
        // now the ones from the unicodesymbols file that are not already there
-       for (pair<char_type, CharInfo> const & elem : unicodesymbols) {
+       for (auto const & elem : unicodesymbols) {
                if (find(symbols.begin(), symbols.end(), elem.first) == symbols.end())
                        symbols.push_back(elem.first);
        }
@@ -637,9 +636,9 @@ Encodings::fromLyXName(string const & name, bool allowUnsafe) const
 {
        EncodingList::const_iterator const it = encodinglist.find(name);
        if (it == encodinglist.end())
-               return 0;
+               return nullptr;
        if (!allowUnsafe && it->second.unsafe())
-               return 0;
+               return nullptr;
        return &it->second;
 }
 
@@ -663,7 +662,7 @@ Encodings::fromLaTeXName(string const & n, int const & p, bool allowUnsafe) cons
                if ((it->second.latexName() == name) && (it->second.package() & p)
                                && (!it->second.unsafe() || allowUnsafe))
                        return &it->second;
-       return 0;
+       return nullptr;
 }
 
 
@@ -675,7 +674,7 @@ Encodings::fromIconvName(string const & n, int const & p, bool allowUnsafe) cons
                if ((it->second.iconvName() == n) && (it->second.package() & p)
                                && (!it->second.unsafe() || allowUnsafe))
                        return &it->second;
-       return 0;
+       return nullptr;
 }
 
 
@@ -703,7 +702,7 @@ void Encodings::read(FileName const & encfile, FileName const & symbolsfile)
                istringstream is(symbolslex.getString());
                // reading symbol directly does not work if
                // char_type == wchar_t.
-               boost::uint32_t tmp;
+               uint32_t tmp;
                if(!(is >> hex >> tmp))
                        break;
                symbol = tmp;