Add Size operators; install util.h
[libdcp.git] / src / util.cc
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);
+}
+