summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2023-08-08 15:06:49 +0200
committerCarl Hetherington <cth@carlh.net>2023-08-09 00:42:59 +0200
commitffb3b2d148dc1c68536f9d230c40df0026b93351 (patch)
tree390d00b02d00fadea4e8b7bd2abd0b3dda58c64d /src
parent1818fb08ebe8dfa34f26f49667a70cffd752fde2 (diff)
Cleanup: use a lambda.
Diffstat (limited to 'src')
-rw-r--r--src/lib/film.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index f7dd0cbe4..a8d8de5c3 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -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;
}