diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-12 23:42:45 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-12 23:42:45 +0100 |
| commit | 2354c1fd781879d215834ebe54661f125fcb324e (patch) | |
| tree | 936e6ae61f3f1eac565e48babf169de1833f9ac8 /src/lib/dcpomatic_time.cc | |
| parent | a7be213f1063e3c5cb4dcba37aa0443d1f28f9d5 (diff) | |
| parent | da46a695431d3b573924e53ac1a0163056a1a5b5 (diff) | |
Merge branch '2678-reel-break' into v2.17.x
Diffstat (limited to 'src/lib/dcpomatic_time.cc')
| -rw-r--r-- | src/lib/dcpomatic_time.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc index ac797f8f4..60fc5342a 100644 --- a/src/lib/dcpomatic_time.cc +++ b/src/lib/dcpomatic_time.cc @@ -27,6 +27,25 @@ using std::string; using namespace dcpomatic; +bool +dcpomatic::operator<=(HMSF const& a, HMSF const& b) +{ + if (a.h != b.h) { + return a.h <= b.h; + } + + if (a.m != b.m) { + return a.m <= b.m; + } + + if (a.s != b.s) { + return a.s <= b.s; + } + + return a.f <= b.f; +} + + template <> Time<ContentTimeDifferentiator, DCPTimeDifferentiator>::Time (DCPTime d, FrameRateChange f) : _t (llrint(d.get() * f.speed_up)) |
