summaryrefslogtreecommitdiff
path: root/modules/xatlas_unwrap
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-02-08 10:57:18 +0100
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-02-08 10:57:18 +0100
commitf7209b459b4faaae9d93bfb6ac5346eb41787f92 (patch)
tree790808a314837cd3f16c9d229401882046bd6fae /modules/xatlas_unwrap
parent57e2822a05c29db3980ad243c37a34acf6c4d14b (diff)
Initialize class/struct variables with default values in modules/
Diffstat (limited to 'modules/xatlas_unwrap')
-rw-r--r--modules/xatlas_unwrap/register_types.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 9f6e7efb27..880fe2df61 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/modules/xatlas_unwrap/register_types.cpp
@@ -163,8 +163,8 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
*r_uvs = (float *)malloc(sizeof(float) * output.vertexCount * 2);
*r_indices = (int *)malloc(sizeof(int) * output.indexCount);
- float max_x = 0;
- float max_y = 0;
+ float max_x = 0.0;
+ float max_y = 0.0;
for (uint32_t i = 0; i < output.vertexCount; i++) {
(*r_vertices)[i] = output.vertexArray[i].xref;
(*r_uvs)[i * 2 + 0] = output.vertexArray[i].uv[0] / w;