From 3083285c79b961cfbde702b5f837e55de8a7c26d Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 4 Sep 2019 02:42:55 -0400 Subject: [PATCH] CVector2i: Implement operator!= in terms of operator== Same behavior, but without duplicated inverted logic. --- include/zeus/CVector2i.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/zeus/CVector2i.hpp b/include/zeus/CVector2i.hpp index 99fac02..ce5db60 100644 --- a/include/zeus/CVector2i.hpp +++ b/include/zeus/CVector2i.hpp @@ -28,7 +28,7 @@ public: bool operator==(const CVector2i& other) const { return x == other.x && y == other.y; } - bool operator!=(const CVector2i& other) const { return x != other.x || y != other.y; } + bool operator!=(const CVector2i& other) const { return !operator==(other); } CVector2i operator*(int32_t val) const { return CVector2i(x * val, y * val); } };