diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-04-29 09:14:20 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-04-29 20:53:49 +0200 |
| commit | 39fb8198febde1937019db1c300ec363aab5aa56 (patch) | |
| tree | 52bc32134e8ae2b5587b3a62130baa9acf815b60 /src/lib/empty.cc | |
| parent | b249700e1da7dd6631a8b4440587f4093a2bdef1 (diff) | |
C++11 tidying.
Diffstat (limited to 'src/lib/empty.cc')
| -rw-r--r-- | src/lib/empty.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/empty.cc b/src/lib/empty.cc index 0cf2b85dc..f6dcad96f 100644 --- a/src/lib/empty.cc +++ b/src/lib/empty.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2017 Carl Hetherington <cth@carlh.net> + Copyright (C) 2017-2021 Carl Hetherington <cth@carlh.net> This file is part of DCP-o-matic. @@ -18,6 +18,7 @@ */ + #include "empty.h" #include "film.h" #include "playlist.h" @@ -28,29 +29,32 @@ #include "piece.h" #include <iostream> + using std::cout; using std::list; using std::shared_ptr; using std::dynamic_pointer_cast; -using boost::function; +using std::function; using namespace dcpomatic; + Empty::Empty (shared_ptr<const Film> film, shared_ptr<const Playlist> playlist, function<bool (shared_ptr<const Content>)> part, DCPTime length) { list<DCPTimePeriod> full; for (auto i: playlist->content()) { if (part(i)) { - full.push_back (DCPTimePeriod (i->position(), i->end(film))); + full.push_back (DCPTimePeriod(i->position(), i->end(film))); } } _periods = subtract (DCPTimePeriod(DCPTime(), length), coalesce(full)); - if (!_periods.empty ()) { + if (!_periods.empty()) { _position = _periods.front().from; } } + void Empty::set_position (DCPTime position) { @@ -70,6 +74,7 @@ Empty::set_position (DCPTime position) } } + DCPTimePeriod Empty::period_at_position () const { @@ -82,6 +87,7 @@ Empty::period_at_position () const DCPOMATIC_ASSERT (false); } + bool Empty::done () const { |
