diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-07 10:57:33 +0000 |
| commit | 08d62727f7f1c813cbc7041027fe4a52518623da (patch) | |
| tree | 756e38e4ad5ee2bdb51690e8a6fb149909c53712 /src/lib/dcpomatic_time.cc | |
| parent | 09806bc8d6a48fc79d923ec1cdf6f90176bf8b6a (diff) | |
operator bool on Time is a really bad idea; removed it and fixed lots of bugs.
Diffstat (limited to 'src/lib/dcpomatic_time.cc')
| -rw-r--r-- | src/lib/dcpomatic_time.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc index 5344915c0..98888646d 100644 --- a/src/lib/dcpomatic_time.cc +++ b/src/lib/dcpomatic_time.cc @@ -19,6 +19,8 @@ #include "dcpomatic_time.h" +using std::ostream; + ContentTime::ContentTime (DCPTime d, FrameRateChange f) : Time (rint (d.get() * f.speed_up)) { @@ -33,3 +35,17 @@ DCPTime min (DCPTime a, DCPTime b) return b; } + +ostream & +operator<< (ostream& s, ContentTime t) +{ + s << "[CONT " << t.get() << " " << t.seconds() << "s]"; + return s; +} + +ostream & +operator<< (ostream& s, DCPTime t) +{ + s << "[DCP " << t.get() << " " << t.seconds() << "s]"; + return s; +} |
