summaryrefslogtreecommitdiff
path: root/modules/csg
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-01-16 10:59:45 +0100
committerRémi Verschelde <rverschelde@gmail.com>2019-01-16 10:59:45 +0100
commit053d7f37650cc03261dabf09b860c530daed4fc9 (patch)
tree8000425cc4ed60ca19c96e84a49dd9ba761bec58 /modules/csg
parente7844505b18fecebad1ce84ddc20fe510c469028 (diff)
Fix some errors found by static analysis
Fixes items 10, 16 and 19 from PVS-Studio blog post in #24014.
Diffstat (limited to 'modules/csg')
-rw-r--r--modules/csg/csg_shape.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp
index 809fd841c1..a13f731c11 100644
--- a/modules/csg/csg_shape.cpp
+++ b/modules/csg/csg_shape.cpp
@@ -1132,9 +1132,9 @@ CSGBrush *CSGBox::_build_brush() {
for (int k = 0; k < 3; k++) {
if (i < 3)
- face_points[j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
+ face_points[j][(i + k) % 3] = v[k];
else
- face_points[3 - j][(i + k) % 3] = v[k] * (i >= 3 ? -1 : 1);
+ face_points[3 - j][(i + k) % 3] = -v[k];
}
}