]> git.lyx.org Git - lyx.git/blobdiff - src/Encoding.cpp
Ressurect old FileMonitor à la Frankenstein
[lyx.git] / src / Encoding.cpp
index acb91f656fbed521208fb55ffe868444ef2cd6ef..9dde12d1213fc6d06e80ba0d28d27345605e1c39 100644 (file)
@@ -25,8 +25,9 @@
 
 #include <boost/cstdint.hpp>
 
-#include <sstream>
+#include <iterator>
 #include <algorithm>
+#include <sstream>
 
 using namespace std;
 using namespace lyx::support;
@@ -259,16 +260,15 @@ vector<char_type> Encoding::symbolsList() const
        // assure the used encoding is properly initialized
        init();
 
-       // first all encodable characters
-       vector<char_type> symbols(encodable_.begin(), encodable_.end());
-       // add those below start_encodable_
+       // first all those below start_encodable_
+       vector<char_type> symbols;
        for (char_type c = 0; c < start_encodable_; ++c)
                symbols.push_back(c);
+       //add all encodable characters
+       copy(encodable_.begin(), encodable_.end(), back_inserter(symbols));
        // now the ones from the unicodesymbols file
-       CharInfoMap::const_iterator const end = unicodesymbols.end();
-       CharInfoMap::const_iterator it = unicodesymbols.begin();
-       for (; it != end; ++it)
-               symbols.push_back(it->first);
+       for (pair<char_type, CharInfo> const & elem : unicodesymbols)
+               symbols.push_back(elem.first);
        return symbols;
 }