X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_filename_sorter.cc;h=f0370bdcb5d120bde7a9b06aabb5ea4aad9b2caa;hb=67cc6717aeb5f3b96448b206d1b85d68cbb26767;hp=ea5f46da64401e5c92596201e3011a119a319b74;hpb=a5d004b0773f633401528392fc28e66d70e13ac8;p=dcpomatic.git diff --git a/src/lib/image_filename_sorter.cc b/src/lib/image_filename_sorter.cc index ea5f46da6..f0370bdcb 100644 --- a/src/lib/image_filename_sorter.cc +++ b/src/lib/image_filename_sorter.cc @@ -18,22 +18,25 @@ */ + #include "image_filename_sorter.h" #include #include #include #include + using std::list; using std::string; using dcp::locale_convert; using boost::optional; + bool ImageFilenameSorter::operator() (boost::filesystem::path a, boost::filesystem::path b) { - string an = extract_numbers (a); - string bn = extract_numbers (b); + auto an = extract_numbers (a); + auto bn = extract_numbers (b); int const anl = an.length (); int const bnl = bn.length (); @@ -51,7 +54,7 @@ string ImageFilenameSorter::extract_numbers (boost::filesystem::path p) { string numbers; - string const ps = p.leaf().string(); + auto const ps = p.filename().string(); for (size_t i = 0; i < ps.size(); ++i) { if (isdigit (ps[i])) { numbers += ps[i];