summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2022-10-01 21:09:22 +0200
committerRafał Mikrut <mikrutrafal@protonmail.com>2022-10-01 21:09:22 +0200
commit2233624152a3b041daeab8b0fd88a2061b7b8565 (patch)
tree27b6bc31c38e0629a23ea6142f54724045aa2bc5 /scene
parent24115beb3c69e648b1d48f969785b9b0729e1be8 (diff)
Remove usage of unitialized variables
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/cpu_particles_2d.h4
-rw-r--r--scene/3d/cpu_particles_3d.h2
-rw-r--r--scene/resources/particle_process_material.h6
-rw-r--r--scene/resources/surface_tool.cpp2
4 files changed, 7 insertions, 7 deletions
diff --git a/scene/2d/cpu_particles_2d.h b/scene/2d/cpu_particles_2d.h
index 3fd1c7fd0f..00e399b703 100644
--- a/scene/2d/cpu_particles_2d.h
+++ b/scene/2d/cpu_particles_2d.h
@@ -152,8 +152,8 @@ private:
Vector2 direction = Vector2(1, 0);
real_t spread = 45.0;
- real_t parameters_min[PARAM_MAX];
- real_t parameters_max[PARAM_MAX];
+ real_t parameters_min[PARAM_MAX] = {};
+ real_t parameters_max[PARAM_MAX] = {};
Ref<Curve> curve_parameters[PARAM_MAX];
Color color;
diff --git a/scene/3d/cpu_particles_3d.h b/scene/3d/cpu_particles_3d.h
index d84b0aedd2..55c66632e2 100644
--- a/scene/3d/cpu_particles_3d.h
+++ b/scene/3d/cpu_particles_3d.h
@@ -156,7 +156,7 @@ private:
real_t spread = 45.0;
real_t flatness = 0.0;
- real_t parameters_min[PARAM_MAX];
+ real_t parameters_min[PARAM_MAX] = {};
real_t parameters_max[PARAM_MAX] = {};
Ref<Curve> curve_parameters[PARAM_MAX];
diff --git a/scene/resources/particle_process_material.h b/scene/resources/particle_process_material.h
index fe4741d6e5..d88a5b511c 100644
--- a/scene/resources/particle_process_material.h
+++ b/scene/resources/particle_process_material.h
@@ -265,9 +265,9 @@ private:
float spread = 0.0f;
float flatness = 0.0f;
- float params_min[PARAM_MAX];
- float params_max[PARAM_MAX];
- float params[PARAM_MAX];
+ float params_min[PARAM_MAX] = {};
+ float params_max[PARAM_MAX] = {};
+ float params[PARAM_MAX] = {};
Ref<Texture2D> tex_parameters[PARAM_MAX];
Color color;
diff --git a/scene/resources/surface_tool.cpp b/scene/resources/surface_tool.cpp
index 9829c7e86b..94967352c8 100644
--- a/scene/resources/surface_tool.cpp
+++ b/scene/resources/surface_tool.cpp
@@ -986,7 +986,7 @@ void SurfaceTool::append_from(const Ref<Mesh> &p_existing, int p_surface, const
format = 0;
}
- uint32_t nformat;
+ uint32_t nformat = 0;
LocalVector<Vertex> nvertices;
LocalVector<int> nindices;
_create_list(p_existing, p_surface, &nvertices, &nindices, nformat);