diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-03-17 12:39:14 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-03-17 12:39:14 +0000 |
| commit | f6943382731a98b2ca33de534fcbb9fd3d1ddf60 (patch) | |
| tree | 843279a54352875e57d950b3bc60d62944f5dd3b /src/types.cc | |
| parent | 528e3f81143401577a5a101e8d868ac431969f5b (diff) | |
Move Size operator functions to the same file as the class declaration.
Diffstat (limited to 'src/types.cc')
| -rw-r--r-- | src/types.cc | 16 |
1 files changed, 16 insertions, 0 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". */ |
