diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-01-05 16:55:32 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-01-05 16:55:32 +0000 |
| commit | ca5f02dbf193fa5655c57cb25be96a3c9fd05157 (patch) | |
| tree | d5be6180bca64a0f4f8af9aaef2030080787fc24 /src/dcp_time.cc | |
| parent | e3b5521ac40125c3dfd9f254856cf58ea1584f79 (diff) | |
Put everything into dcp::dc and change DCP -> Package.
Diffstat (limited to 'src/dcp_time.cc')
| -rw-r--r-- | src/dcp_time.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/dcp_time.cc b/src/dcp_time.cc index 4e7ab6f2..8ee7cc03 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -31,7 +31,7 @@ using namespace std; using namespace boost; -using namespace dcp; +using namespace dcp::dc; Time::Time (int frame, int frames_per_second, int tcr_) { @@ -94,31 +94,31 @@ Time::Time (string time, int tcr_) } bool -dcp::operator== (Time const & a, Time const & b) +dcp::dc::operator== (Time const & a, Time const & b) { return (a.h == b.h && a.m == b.m && a.s == b.s && (a.e * b.tcr) == (b.e * a.tcr)); } bool -dcp::operator!= (Time const & a, Time const & b) +dcp::dc::operator!= (Time const & a, Time const & b) { return !(a == b); } bool -dcp::operator<= (Time const & a, Time const & b) +dcp::dc::operator<= (Time const & a, Time const & b) { return a < b || a == b; } bool -dcp::operator>= (Time const & a, Time const & b) +dcp::dc::operator>= (Time const & a, Time const & b) { return a > b || a == b; } bool -dcp::operator< (Time const & a, Time const & b) +dcp::dc::operator< (Time const & a, Time const & b) { if (a.h != b.h) { return a.h < b.h; @@ -140,7 +140,7 @@ dcp::operator< (Time const & a, Time const & b) } bool -dcp::operator> (Time const & a, Time const & b) +dcp::dc::operator> (Time const & a, Time const & b) { if (a.h != b.h) { return a.h > b.h; @@ -162,14 +162,14 @@ dcp::operator> (Time const & a, Time const & b) } ostream & -dcp::operator<< (ostream& s, Time const & t) +dcp::dc::operator<< (ostream& s, Time const & t) { s << t.h << ":" << t.m << ":" << t.s << "." << t.e; return s; } -dcp::Time -dcp::operator+ (Time a, Time b) +dcp::dc::Time +dcp::dc::operator+ (Time a, Time b) { Time r; @@ -205,8 +205,8 @@ dcp::operator+ (Time a, Time b) return r; } -dcp::Time -dcp::operator- (Time a, Time b) +dcp::dc::Time +dcp::dc::operator- (Time a, Time b) { Time r; @@ -243,7 +243,7 @@ dcp::operator- (Time a, Time b) } float -dcp::operator/ (Time a, Time const & b) +dcp::dc::operator/ (Time a, Time const & b) { int64_t const at = a.h * 3600 + a.m * 60 + a.s * float (a.e) / a.tcr; int64_t const bt = b.h * 3600 + b.m * 60 + b.s * float (b.e) / b.tcr; |
