From f9467ec1ea6c0dac2ea513b7dfe58d0349788e02 Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Thu, 31 Aug 2017 23:30:35 +0200 Subject: Fix signed and unsigned comparisons The first in my quest to make Godot 3.x compile with -Werror on GCC7 --- modules/gdnative/godot/array.cpp | 14 +++++++------- modules/gdnative/godot/pool_arrays.cpp | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'modules/gdnative') diff --git a/modules/gdnative/godot/array.cpp b/modules/gdnative/godot/array.cpp index c15ba30ca2..c3fde0e954 100644 --- a/modules/gdnative/godot/array.cpp +++ b/modules/gdnative/godot/array.cpp @@ -61,7 +61,7 @@ void GDAPI godot_array_new_pool_color_array(godot_array *r_dest, const godot_poo memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -73,7 +73,7 @@ void GDAPI godot_array_new_pool_vector3_array(godot_array *r_dest, const godot_p memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -85,7 +85,7 @@ void GDAPI godot_array_new_pool_vector2_array(godot_array *r_dest, const godot_p memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -97,7 +97,7 @@ void GDAPI godot_array_new_pool_string_array(godot_array *r_dest, const godot_po memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -109,7 +109,7 @@ void GDAPI godot_array_new_pool_real_array(godot_array *r_dest, const godot_pool memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -121,7 +121,7 @@ void GDAPI godot_array_new_pool_int_array(godot_array *r_dest, const godot_pool_ memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } @@ -133,7 +133,7 @@ void GDAPI godot_array_new_pool_byte_array(godot_array *r_dest, const godot_pool memnew_placement(dest, Array); dest->resize(pca->size()); - for (size_t i = 0; i < dest->size(); i++) { + for (int i = 0; i < dest->size(); i++) { Variant v = pca->operator[](i); dest->operator[](i) = v; } diff --git a/modules/gdnative/godot/pool_arrays.cpp b/modules/gdnative/godot/pool_arrays.cpp index 2e533077f6..49bf851051 100644 --- a/modules/gdnative/godot/pool_arrays.cpp +++ b/modules/gdnative/godot/pool_arrays.cpp @@ -65,7 +65,7 @@ void GDAPI godot_pool_byte_array_new_with_array(godot_pool_byte_array *r_dest, c memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -144,7 +144,7 @@ void GDAPI godot_pool_int_array_new_with_array(godot_pool_int_array *r_dest, con memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -223,7 +223,7 @@ void GDAPI godot_pool_real_array_new_with_array(godot_pool_real_array *r_dest, c memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -302,7 +302,7 @@ void GDAPI godot_pool_string_array_new_with_array(godot_pool_string_array *r_des memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -389,7 +389,7 @@ void GDAPI godot_pool_vector2_array_new_with_array(godot_pool_vector2_array *r_d memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -475,7 +475,7 @@ void GDAPI godot_pool_vector3_array_new_with_array(godot_pool_vector3_array *r_d memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } @@ -561,7 +561,7 @@ void GDAPI godot_pool_color_array_new_with_array(godot_pool_color_array *r_dest, memnew_placement(dest, PoolVector); dest->resize(a->size()); - for (size_t i = 0; i < a->size(); i++) { + for (int i = 0; i < a->size(); i++) { dest->set(i, (*a)[i]); } } -- cgit v1.2.3