]> git.lyx.org Git - lyx.git/blobdiff - src/support/docstring.cpp
Less headers in docstring.
[lyx.git] / src / support / docstring.cpp
index 86deda1d869de654064c2a38c661d47c08c93a48..b525297c3246961f1e6b452eacbe68e4057e25b5 100644 (file)
 
 #include <QFile>
 
-#include <locale>
-#include <iostream>
-#include <typeinfo>
-
 using namespace std;
 
+using lyx::support::isHexChar;
 
 namespace lyx {
 
@@ -132,7 +129,7 @@ string const to_local8bit(docstring const & s)
        if (s.empty())
                return string();
        QByteArray const local = toqstr(s).toLocal8Bit();
-       if (local.size() == 0)
+       if (local.isEmpty())
                throw to_local8bit_failure();
        return string(local.begin(), local.end());
 }
@@ -753,9 +750,9 @@ private:
        bool isNumpunct(lyx::char_type const c) const
        {
                /// Only account for the standard numpunct "C" locale facet.
-               return c < 0x80 && (c == '-' || c == '+' || isdigit(c)
-                       || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F')
-                       || c == 'x' || c == 'X');
+               return c == '-' || c == '+'
+                       || c == 'x' || c == 'X'
+                       || isHexChar(c);
        }
 
        template <typename ValueType>