From d8935b27a9af8a6484d271a5b4ebc967a9d0a36f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 10 May 2022 12:05:52 +0200 Subject: Fix warnings found by Emscripten 3.1.10 Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and `-Wliteral-range` warnings. --- modules/csg/csg.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'modules/csg') diff --git a/modules/csg/csg.cpp b/modules/csg/csg.cpp index e0cc0f8234..177014e5a7 100644 --- a/modules/csg/csg.cpp +++ b/modules/csg/csg.cpp @@ -1387,13 +1387,13 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face } // Ensure B has points either side of or in the plane of A. - int in_plane_count = 0, over_count = 0, under_count = 0; + int over_count = 0, under_count = 0; Plane plane_a(vertices_a[0], vertices_a[1], vertices_a[2]); ERR_FAIL_COND_MSG(plane_a.normal == Vector3(), "Couldn't form plane from Brush A face."); for (int i = 0; i < 3; i++) { if (plane_a.has_point(vertices_b[i])) { - in_plane_count++; + // In plane. } else if (plane_a.is_point_over(vertices_b[i])) { over_count++; } else { @@ -1406,7 +1406,6 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face } // Ensure A has points either side of or in the plane of B. - in_plane_count = 0; over_count = 0; under_count = 0; Plane plane_b(vertices_b[0], vertices_b[1], vertices_b[2]); @@ -1414,7 +1413,7 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face for (int i = 0; i < 3; i++) { if (plane_b.has_point(vertices_a[i])) { - in_plane_count++; + // In plane. } else if (plane_b.is_point_over(vertices_a[i])) { over_count++; } else { -- cgit v1.2.3