diff options
author | marxin <mliska@suse.cz> | 2019-02-21 20:57:39 +0100 |
---|---|---|
committer | marxin <mliska@suse.cz> | 2019-02-27 07:45:57 +0100 |
commit | e5f665c7187b6934a71169cab5075f899150f17a (patch) | |
tree | a42da38f0076409975980452e8264a60d94f747d /modules/xatlas_unwrap | |
parent | ce114e35dda4b3f282abb458f8409db2369b279e (diff) |
Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
Diffstat (limited to 'modules/xatlas_unwrap')
-rw-r--r-- | modules/xatlas_unwrap/register_types.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp index 840dd371ac..903b57f017 100644 --- a/modules/xatlas_unwrap/register_types.cpp +++ b/modules/xatlas_unwrap/register_types.cpp @@ -108,7 +108,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver float max_x = 0; float max_y = 0; - for (int i = 0; i < output->vertexCount; i++) { + for (uint32_t i = 0; i < output->vertexCount; i++) { (*r_vertex)[i] = output->vertexArray[i].xref; (*r_uv)[i * 2 + 0] = output->vertexArray[i].uv[0] / w; (*r_uv)[i * 2 + 1] = output->vertexArray[i].uv[1] / h; @@ -119,7 +119,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver printf("final texsize: %f,%f - max %f,%f\n", w, h, max_x, max_y); *r_vertex_count = output->vertexCount; - for (int i = 0; i < output->indexCount; i++) { + for (uint32_t i = 0; i < output->indexCount; i++) { (*r_index)[i] = output->indexArray[i]; } |