1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix warnings found by Emscripten 3.1.10

Fix `-Wunused-but-set-variable`, `-Wunqualified-std-cast-call`, and
`-Wliteral-range` warnings.

(cherry picked from commit d8935b27a9)
This commit is contained in:
Rémi Verschelde
2022-05-10 12:05:52 +02:00
parent 67d2013e67
commit d0306332ac
10 changed files with 35 additions and 48 deletions

View File

@@ -286,7 +286,7 @@ static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_
const Face3 &f = p_faces[indices[i]];
Plane p = f.get_plane();
int num_over = 0, num_under = 0, num_spanning = 0;
int num_over = 0, num_under = 0; //num_spanning = 0;
for (int j = 0; j < ic; j++) {
@@ -309,9 +309,9 @@ static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_
}
}
if (over && under)
num_spanning++;
else if (over)
if (over && under) {
//num_spanning++;
} else if (over)
num_over++;
else
num_under++;

View File

@@ -404,7 +404,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
if (O->get().plane.is_equal_approx(f.plane)) {
//merge and delete edge and contiguous face, while repointing edges (uuugh!)
int ois = O->get().indices.size();
int merged = 0;
for (int j = 0; j < ois; j++) {
//search a
@@ -420,7 +419,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
if (idx != a) {
f.indices.insert(i + 1, idx);
i++;
merged++;
}
Edge e2(idx, idxn);