From 356d0fccc23db2d822dba83f03b802a5217ca93f Mon Sep 17 00:00:00 2001 From: PouleyKetchoupp Date: Tue, 21 Apr 2020 20:21:22 +0200 Subject: [PATCH] Remove useless "else" statements from vector3.h --- core/math/vector3.h | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/core/math/vector3.h b/core/math/vector3.h index 3fdb9447295..6b4ff3f9a8a 100644 --- a/core/math/vector3.h +++ b/core/math/vector3.h @@ -324,48 +324,40 @@ bool Vector3::operator<(const Vector3 &p_v) const { if (x == p_v.x) { if (y == p_v.y) { return z < p_v.z; - } else { - return y < p_v.y; } - } else { - return x < p_v.x; + return y < p_v.y; } + return x < p_v.x; } bool Vector3::operator>(const Vector3 &p_v) const { if (x == p_v.x) { if (y == p_v.y) { return z > p_v.z; - } else { - return y > p_v.y; } - } else { - return x > p_v.x; + return y > p_v.y; } + return x > p_v.x; } bool Vector3::operator<=(const Vector3 &p_v) const { if (x == p_v.x) { if (y == p_v.y) { return z <= p_v.z; - } else { - return y < p_v.y; } - } else { - return x < p_v.x; + return y < p_v.y; } + return x < p_v.x; } bool Vector3::operator>=(const Vector3 &p_v) const { if (x == p_v.x) { if (y == p_v.y) { return z >= p_v.z; - } else { - return y > p_v.y; } - } else { - return x > p_v.x; + return y > p_v.y; } + return x > p_v.x; } _FORCE_INLINE_ Vector3 vec3_cross(const Vector3 &p_a, const Vector3 &p_b) {