#include <algorithm>
#include <fstream>
-#include <locale>
using std::string;
using std::vector;
LanguagePair, bool>
{
public:
-#if defined(__GNUC__) && (!defined(USE_WCHAR_T) || __GNUC__ < 4)
bool operator()(LanguagePair const & lhs,
LanguagePair const & rhs) const {
return lhs.first < rhs.first;
}
-#else
- Sorter() : loc_("") {};
- bool operator()(LanguagePair const & lhs,
- LanguagePair const & rhs) const {
- return loc_(lhs.first, rhs.first);
+};
+
+
+class ColorSorter
+{
+public:
+ bool operator()(Color::color const & lhs,
+ Color::color const & rhs) const {
+ return lcolor.getGUIName(lhs) < lcolor.getGUIName(rhs);
}
-private:
- std::locale loc_;
-#endif
};
} // namespace anon
return langs;
}
+
+vector<Color_color> const getSortedColors(vector<Color_color> colors)
+{
+ // sort the colors
+ std::sort(colors.begin(), colors.end(), ColorSorter());
+ return colors;
+}
+
} // namespace frontend
using support::addName;