From 71594d402e8fa297fbf5b964a2921e514e28e5eb Mon Sep 17 00:00:00 2001 From: ZXShady <153229951+ZXShady@users.noreply.github.com> Date: Sun, 29 Sep 2024 23:01:29 +0100 Subject: [PATCH] delegate to operator equals in operator not equals --- include/SFML/System/Vector2.inl | 2 +- include/SFML/System/Vector3.inl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/SFML/System/Vector2.inl b/include/SFML/System/Vector2.inl index ed1ce017e..8955dd382 100644 --- a/include/SFML/System/Vector2.inl +++ b/include/SFML/System/Vector2.inl @@ -210,7 +210,7 @@ constexpr bool operator==(Vector2 left, Vector2 right) template constexpr bool operator!=(Vector2 left, Vector2 right) { - return (left.x != right.x) || (left.y != right.y); + return !(left == right); } diff --git a/include/SFML/System/Vector3.inl b/include/SFML/System/Vector3.inl index 1d0a45106..4baa5a48c 100644 --- a/include/SFML/System/Vector3.inl +++ b/include/SFML/System/Vector3.inl @@ -210,7 +210,7 @@ constexpr bool operator==(const Vector3& left, const Vector3& right) template constexpr bool operator!=(const Vector3& left, const Vector3& right) { - return (left.x != right.x) || (left.y != right.y) || (left.z != right.z); + return !(left == right); } } // namespace sf