diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-02-16 16:55:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 16:55:07 +0100 |
commit | 51a00c2855009ce4cd6475c09209ebd22641f448 (patch) | |
tree | 56b249dbe446b5e24946c16ee13bd8241a119de6 /scene/resources/surface_tool.cpp | |
parent | 33c7f52f361961c64432cfd772909ed3ba76cd51 (diff) | |
parent | b8b45804485f7ca18f035f1eeb7a1ac0cf591cac (diff) |
Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcode
Diffstat (limited to 'scene/resources/surface_tool.cpp')
-rw-r--r-- | scene/resources/surface_tool.cpp | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index 52151ae846..8ff1fde2cf 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -150,12 +150,15 @@ uint32_t SurfaceTool::TriangleHasher::hash(const int *p_triangle) { int t1 = p_triangle[1]; int t2 = p_triangle[2]; - if (t0 > t1) + if (t0 > t1) { SWAP(t0, t1); - if (t1 > t2) + } + if (t1 > t2) { SWAP(t1, t2); - if (t0 > t1) + } + if (t0 > t1) { SWAP(t0, t1); + } return (t0 * 73856093) ^ (t1 * 19349663) ^ (t2 * 83492791); } @@ -165,23 +168,29 @@ bool SurfaceTool::TriangleHasher::compare(const int *p_lhs, const int *p_rhs) { int r1 = p_rhs[1]; int r2 = p_rhs[2]; - if (r0 > r1) + if (r0 > r1) { SWAP(r0, r1); - if (r1 > r2) + } + if (r1 > r2) { SWAP(r1, r2); - if (r0 > r1) + } + if (r0 > r1) { SWAP(r0, r1); + } int l0 = p_lhs[0]; int l1 = p_lhs[1]; int l2 = p_lhs[2]; - if (l0 > l1) + if (l0 > l1) { SWAP(l0, l1); - if (l1 > l2) + } + if (l1 > l2) { SWAP(l1, l2); - if (l0 > l1) + } + if (l0 > l1) { SWAP(l0, l1); + } return l0 == r0 && l1 == r1 && l2 == r2; } |