-class ImageFilenameSorter
-{
-public:
- bool operator() (boost::filesystem::path a, boost::filesystem::path b)
- {
- std::list<int> na = extract_numbers (a);
- std::list<int> nb = extract_numbers (b);
- if (na.empty() || nb.empty()) {
- return a.string() < b.string();
- }
-
- if (na.size() != nb.size()) {
- /* Just use the first one */
- return na.front() < nb.front();
- }