summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-12-21 23:09:59 +0000
committerCarl Hetherington <cth@carlh.net>2012-12-21 23:09:59 +0000
commit914a93ee4dd48583b057305f463bee3fb2254cc7 (patch)
tree1d2ada613fb56fa3281141a881022a87cb616db2 /src/lib
parent81c40635c73b402e13613a614fa8b9e9c2aa703a (diff)
Fix crash from previous commit; clear viewer image when its size changes (#12).
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/util.cc5
-rw-r--r--src/lib/util.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc
index 66eaea39e..a68496e94 100644
--- a/src/lib/util.cc
+++ b/src/lib/util.cc
@@ -369,6 +369,11 @@ bool operator== (Size const & a, Size const & b)
return (a.width == b.width && a.height == b.height);
}
+bool operator!= (Size const & a, Size const & b)
+{
+ return !(a == b);
+}
+
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);
diff --git a/src/lib/util.h b/src/lib/util.h
index 68c7bd384..3832cc579 100644
--- a/src/lib/util.h
+++ b/src/lib/util.h
@@ -103,6 +103,7 @@ struct Size
};
extern bool operator== (Size const & a, Size const & b);
+extern bool operator!= (Size const & a, Size const & b);
/** @struct Crop
* @brief A description of the crop of an image or video.