- std::list<int> numbers_as_int;
- BOOST_FOREACH (std::string i, numbers) {
- numbers_as_int.push_back (raw_convert<int> (i));
+list<int>
+ImageFilenameSorter::extract_numbers (boost::filesystem::path p)
+{
+ p = p.leaf ();
+
+ std::list<std::string> numbers;
+
+ std::string current;
+ for (size_t i = 0; i < p.string().size(); ++i) {
+ if (isdigit (p.string()[i])) {
+ current += p.string()[i];
+ } else {
+ if (!current.empty ()) {
+ numbers.push_back (current);
+ current.clear ();
+ }