From d1ee507ec46cc28597717175cd43d32f98fac577 Mon Sep 17 00:00:00 2001 From: Jonas Kulla Date: Sun, 12 Jul 2015 10:30:36 +0200 Subject: [PATCH] Vec2i, IntRect: Add unequal operator --- src/etc-internal.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/etc-internal.h b/src/etc-internal.h index 9bab3a8..6c66239 100644 --- a/src/etc-internal.h +++ b/src/etc-internal.h @@ -88,6 +88,11 @@ struct Vec2i return x == other.x && y == other.y; } + bool operator!=(const Vec2i &other) const + { + return !(*this == other); + } + Vec2i &operator+=(const Vec2i &value) { x += value.x; @@ -176,6 +181,11 @@ struct IntRect : SDL_Rect w == other.w && h == other.h); } + bool operator!=(const IntRect &other) const + { + return !(*this == other); + } + Vec2i pos() const { return Vec2i(x, y);