Fix some errors found by static analysis

Fixes items 10, 16 and 19 from PVS-Studio blog post
in #24014.
This commit is contained in:
Rémi Verschelde
2019-01-16 10:59:45 +01:00
parent e7844505b1
commit 053d7f3765
3 changed files with 9 additions and 20 deletions

View File

@ -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];
}
}