Vec2i, IntRect: Add unequal operator

This commit is contained in:
Jonas Kulla 2015-07-12 10:30:36 +02:00
parent 21247b18b5
commit d1ee507ec4
1 changed files with 10 additions and 0 deletions

View File

@ -88,6 +88,11 @@ struct Vec2i
return x == other.x && y == other.y; return x == other.x && y == other.y;
} }
bool operator!=(const Vec2i &other) const
{
return !(*this == other);
}
Vec2i &operator+=(const Vec2i &value) Vec2i &operator+=(const Vec2i &value)
{ {
x += value.x; x += value.x;
@ -176,6 +181,11 @@ struct IntRect : SDL_Rect
w == other.w && h == other.h); w == other.w && h == other.h);
} }
bool operator!=(const IntRect &other) const
{
return !(*this == other);
}
Vec2i pos() const Vec2i pos() const
{ {
return Vec2i(x, y); return Vec2i(x, y);