diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/types.cc | 16 | ||||
| -rw-r--r-- | src/types.h | 4 | ||||
| -rw-r--r-- | src/util.cc | 16 | ||||
| -rw-r--r-- | src/util.h | 4 |
4 files changed, 20 insertions, 20 deletions
diff --git a/src/types.cc b/src/types.cc index 0347d02f..a7c621ff 100644 --- a/src/types.cc +++ b/src/types.cc @@ -44,6 +44,22 @@ using namespace std; using namespace dcp; using namespace boost; +bool dcp::operator== (dcp::Size const & a, dcp::Size const & b) +{ + return (a.width == b.width && a.height == b.height); +} + +bool dcp::operator!= (dcp::Size const & a, dcp::Size const & b) +{ + return !(a == b); +} + +ostream& dcp::operator<< (ostream& s, dcp::Size const & a) +{ + s << a.width << "x" << a.height; + return s; +} + /** Construct a Fraction from a string of the form <numerator> <denominator> * e.g. "1 3". */ diff --git a/src/types.h b/src/types.h index dfa49ff6..14f10c3f 100644 --- a/src/types.h +++ b/src/types.h @@ -68,6 +68,10 @@ struct Size int height; }; +extern bool operator== (Size const & a, Size const & b); +extern bool operator!= (Size const & a, Size const & b); +extern std::ostream& operator<< (std::ostream& s, Size const & a); + /** Identifier for a sound channel */ enum Channel { LEFT = 0, ///< left diff --git a/src/util.cc b/src/util.cc index 15b833a1..6dde5b37 100644 --- a/src/util.cc +++ b/src/util.cc @@ -245,22 +245,6 @@ dcp::init () } } -bool dcp::operator== (dcp::Size const & a, dcp::Size const & b) -{ - return (a.width == b.width && a.height == b.height); -} - -bool dcp::operator!= (dcp::Size const & a, dcp::Size const & b) -{ - return !(a == b); -} - -ostream& dcp::operator<< (ostream& s, dcp::Size const & a) -{ - s << a.width << "x" << a.height; - return s; -} - /** Decode a base64 string. The base64 decode routine in KM_util.cpp * gives different values to both this and the command-line base64 * for some inputs. Not sure why. @@ -59,10 +59,6 @@ class CertificateChain; class GammaLUT; class OpenJPEGImage; -extern bool operator== (Size const & a, Size const & b); -extern bool operator!= (Size const & a, Size const & b); -extern std::ostream& operator<< (std::ostream& s, Size const & a); - extern std::string make_uuid (); extern std::string make_digest (boost::filesystem::path filename, boost::function<void (float)>); extern std::string content_kind_to_string (ContentKind kind); |
