projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d55a89f
)
Cleanup: use lambda.
author
Carl Hetherington
<cth@carlh.net>
Thu, 20 Jan 2022 20:23:14 +0000
(21:23 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Mon, 24 Jan 2022 14:59:44 +0000
(15:59 +0100)
src/lib/shuffler.cc
patch
|
blob
|
history
diff --git
a/src/lib/shuffler.cc
b/src/lib/shuffler.cc
index f6a3bdc7a6737e906f7b1411aa1a0f92669dc19d..880826d4485c89ab2ac385bd32a802c0b8f21959 100644
(file)
--- a/
src/lib/shuffler.cc
+++ b/
src/lib/shuffler.cc
@@
-37,17
+37,6
@@
using boost::optional;
int const Shuffler::_max_size = 64;
int const Shuffler::_max_size = 64;
-struct Comparator
-{
- bool operator()(Shuffler::Store const & a, Shuffler::Store const & b) {
- if (a.second.frame != b.second.frame) {
- return a.second.frame < b.second.frame;
- }
- return a.second.eyes < b.second.eyes;
- }
-};
-
-
void
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
{
void
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
{
@@
-71,7
+60,12
@@
Shuffler::video (weak_ptr<Piece> weak_piece, ContentVideo video)
}
_store.push_back (make_pair (weak_piece, video));
}
_store.push_back (make_pair (weak_piece, video));
- _store.sort (Comparator());
+ _store.sort ([](Shuffler::Store const & a, Shuffler::Store const & b) {
+ if (a.second.frame != b.second.frame) {
+ return a.second.frame < b.second.frame;
+ }
+ return a.second.eyes < b.second.eyes;
+ });
while (true) {
while (true) {