Cleanup: use a lambda.
authorCarl Hetherington <cth@carlh.net>
Tue, 8 Aug 2023 13:06:49 +0000 (15:06 +0200)
committerCarl Hetherington <cth@carlh.net>
Tue, 8 Aug 2023 22:42:59 +0000 (00:42 +0200)
src/lib/film.cc

index f7dd0cbe49d94782354833e06498fc1083bf30be..a8d8de5c3b1515c100783188cf785aa63f8f2fcf 100644 (file)
@@ -1296,12 +1296,6 @@ Film::j2c_path (int reel, Frame frame, Eyes eyes, bool tmp) const
        return file (p);
 }
 
-static
-bool
-cpl_summary_compare (CPLSummary const & a, CPLSummary const & b)
-{
-       return a.last_write_time > b.last_write_time;
-}
 
 /** Find all the DCPs in our directory that can be dcp::DCP::read() and return details of their CPLs.
  *  The list will be returned in reverse order of timestamp (i.e. most recent first).
@@ -1330,7 +1324,9 @@ Film::cpls () const
                }
        }
 
-       sort (out.begin(), out.end(), cpl_summary_compare);
+       sort(out.begin(), out.end(), [](CPLSummary const& a, CPLSummary const& b) {
+               return a.last_write_time > b.last_write_time;
+       });
 
        return out;
 }