From 7961a1dea3e7ce8c4e7197a0000e35ab31e9ff2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Tue, 9 Feb 2021 18:24:36 +0100 Subject: Initialize class variables with default values in scene/ [2/2] --- scene/resources/surface_tool.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'scene/resources/surface_tool.cpp') diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp index dbf5268762..5ce3532d42 100644 --- a/scene/resources/surface_tool.cpp +++ b/scene/resources/surface_tool.cpp @@ -160,7 +160,7 @@ void SurfaceTool::add_vertex(const Vector3 &p_vertex) { //cap weights.resize(expected_vertices); //renormalize - float total = 0; + float total = 0.0; for (int i = 0; i < expected_vertices; i++) { total += weights[i].weight; } @@ -1196,12 +1196,7 @@ void SurfaceTool::_bind_methods() { } SurfaceTool::SurfaceTool() { - first = false; - begun = false; for (int i = 0; i < RS::ARRAY_CUSTOM_COUNT; i++) { last_custom_format[i] = CUSTOM_MAX; } - primitive = Mesh::PRIMITIVE_LINES; - skin_weights = SKIN_4_WEIGHTS; - format = 0; } -- cgit v1.2.3