Add Size operators; install util.h
authorCarl Hetherington <cth@carlh.net>
Thu, 17 Jan 2013 21:30:34 +0000 (21:30 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 17 Jan 2013 21:30:34 +0000 (21:30 +0000)
src/util.cc
src/util.h
src/wscript

index 4ddb466c6145f337ce9dedbfeb492936bbccc933..1cbec71923abd56fac975961df55410f3283c857 100644 (file)
@@ -277,3 +277,14 @@ libdcp::empty_or_white_space (string s)
 
        return true;
 }
+
+bool libdcp::operator== (libdcp::Size const & a, libdcp::Size const & b)
+{
+       return (a.width == b.width && a.height == b.height);
+}
+
+bool libdcp::operator!= (libdcp::Size const & a, libdcp::Size const & b)
+{
+       return !(a == b);
+}
+
index dd153cb3f5fbfd3d81bf05bc79eb8f20644929a6..f568597023f238c34444a92b2c4c526103b9791f 100644 (file)
@@ -49,6 +49,9 @@ struct Size {
        int height;
 };
        
+extern bool operator== (Size const & a, Size const & b);
+extern bool operator!= (Size const & a, Size const & b);
+
 extern std::string make_uuid ();
 extern std::string make_digest (std::string filename);
 extern std::string content_kind_to_string (ContentKind kind);
index 04656976d066319585d1f64f78361aaf93b2833d..d243ae467642bda867d089547de41c72ae72b30b 100644 (file)
@@ -49,6 +49,7 @@ def build(bld):
               subtitle_asset.h
               test_mode.h
               types.h
+              util.h
               version.h
               xml.h
               """