diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/api/script_road.cpp | 6 | ||||
-rw-r--r-- | src/script/squirrel_helper_type.hpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/script/api/script_road.cpp b/src/script/api/script_road.cpp index 3dd1453b6..44972cdea 100644 --- a/src/script/api/script_road.cpp +++ b/src/script/api/script_road.cpp @@ -245,7 +245,7 @@ static int32 LookupWithBuildOnSlopes(::Slope slope, Array *existing, int32 start /* Now perform the actual rotation. */ for (int j = 0; j < base_rotate; j++) { - for (int i = 0; i < existing->size; i++) { + for (size_t i = 0; i < existing->size; i++) { existing->array[i] = RotateNeighbour(existing->array[i]); } start = RotateNeighbour(start); @@ -256,7 +256,7 @@ static int32 LookupWithBuildOnSlopes(::Slope slope, Array *existing, int32 start RoadBits start_roadbits = NeighbourToRoadBits(start); RoadBits new_roadbits = start_roadbits | NeighbourToRoadBits(end); RoadBits existing_roadbits = ROAD_NONE; - for (int i = 0; i < existing->size; i++) { + for (size_t i = 0; i < existing->size; i++) { existing_roadbits |= NeighbourToRoadBits(existing->array[i]); } @@ -354,7 +354,7 @@ static bool NormaliseTileOffset(int32 *tile) /* The start tile and end tile cannot be the same tile either. */ if (start == end) return -1; - for (int i = 0; i < existing->size; i++) { + for (size_t i = 0; i < existing->size; i++) { if (!NormaliseTileOffset(&existing->array[i])) return -1; } diff --git a/src/script/squirrel_helper_type.hpp b/src/script/squirrel_helper_type.hpp index 946a59547..a42cd79a9 100644 --- a/src/script/squirrel_helper_type.hpp +++ b/src/script/squirrel_helper_type.hpp @@ -14,7 +14,7 @@ /** Definition of a simple array. */ struct Array { - int32 size; ///< The size of the array. + size_t size; ///< The size of the array. int32 array[]; ///< The data of the array. }; |