From 49b620188f82329d8b04e016bd78bcfdac625dbc Mon Sep 17 00:00:00 2001 From: Bert Gijsbers Date: Sun, 11 Mar 2018 21:04:44 +0100 Subject: [PATCH] equal --- src/yrect.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/yrect.h b/src/yrect.h index 7ef0e85b6..e35508a2e 100644 --- a/src/yrect.h +++ b/src/yrect.h @@ -47,6 +47,13 @@ class YRect { return intersect(r).pixels(); } + bool operator==(YRect const& r) const { + return xx == r.xx && yy == r.yy && ww == r.ww && hh == r.hh; + } + bool operator!=(YRect const& r) const { + return !(*this == r); + } + private: int xx, yy; unsigned ww, hh;