summaryrefslogtreecommitdiff
path: root/scene/resources/mesh.cpp
diff options
context:
space:
mode:
authorMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-05-13 23:26:45 -0300
committerMichael Alexsander Silva Dias <michaelalexsander@protonmail.com>2018-05-14 02:14:56 -0300
commit7f72d6476b7bf5a248685e91a994ac4d73e50ff6 (patch)
treefd6136d186eb11a8421835c27810945974d7c964 /scene/resources/mesh.cpp
parent0db3d1d2a754aa122bcbb6ed74cf6f10ba3fc859 (diff)
Fixed some warnings found with Cppcheck.
Diffstat (limited to 'scene/resources/mesh.cpp')
-rw-r--r--scene/resources/mesh.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp
index d87644381c..b0620d3363 100644
--- a/scene/resources/mesh.cpp
+++ b/scene/resources/mesh.cpp
@@ -222,7 +222,6 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
continue;
Array a = surface_get_arrays(i);
- int vcount = 0;
if (i == 0) {
arrays = a;
@@ -230,6 +229,7 @@ Ref<Mesh> Mesh::create_outline(float p_margin) const {
index_accum += v.size();
} else {
+ int vcount = 0;
for (int j = 0; j < arrays.size(); j++) {
if (arrays[j].get_type() == Variant::NIL || a[j].get_type() == Variant::NIL) {
@@ -1194,8 +1194,6 @@ Error ArrayMesh::lightmap_unwrap(const Transform &p_base_transform, float p_texe
for (int j = 0; j < 3; j++) {
- int vertex_idx = gen_vertices[gen_indices[i + j]];
-
SurfaceTool::Vertex v = surfaces[surface].vertices[uv_index[gen_vertices[gen_indices[i + j]]].second];
if (surfaces[surface].format & ARRAY_FORMAT_COLOR) {