summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-27 22:30:35 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-27 22:30:35 +0100
commit6427e9dcb2cd239dcd5a392aac847df47f9875d9 (patch)
treeeb69053b6b103db808bfeaf1d07fc9c729fa533f /src/lib/util.cc
parent423928e4a0c9294f7e7da30030f00e3fc09cdf14 (diff)
Use a Crop struct and use it to speed up cropping a bit.
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index c15433953..5106f3182 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -491,3 +491,13 @@ dcp_audio_sample_rate (int fs)
return 96000;
}
+
+bool operator== (Crop const & a, Crop const & b)
+{
+ return (a.left == b.left && a.right == b.right && a.top == b.top && a.bottom == b.bottom);
+}
+
+bool operator!= (Crop const & a, Crop const & b)
+{
+ return !(a == b);
+}