diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-01-19 23:47:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-19 23:47:42 +0100 |
commit | 5a9bd8e51cab94e2e03a053ff3794a1862bd95d1 (patch) | |
tree | a19d63402d3ea8b65f0add470e9e57ce82a57c80 | |
parent | 53e234fe5fa9e54372c897e4409dce9f4b3b1fe7 (diff) | |
parent | 356d0fccc23db2d822dba83f03b802a5217ca93f (diff) |
Merge pull request #45321 from aaronfranke/vector-operators-equality
Remove useless "else" statements from vector3.h
-rw-r--r-- | core/math/vector3.h | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/core/math/vector3.h b/core/math/vector3.h index 3fdb944729..6b4ff3f9a8 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) { |