From 7a51ae042afeea186035ae89ee2c23153387554d Mon Sep 17 00:00:00 2001 From: Nikita Titov Date: Wed, 7 Oct 2020 13:02:25 +0300 Subject: [PATCH] fix type casting warning (#3437) --- swig/StringArray.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/swig/StringArray.hpp b/swig/StringArray.hpp index 4fef62a125e2..397f2c46c8be 100644 --- a/swig/StringArray.hpp +++ b/swig/StringArray.hpp @@ -120,9 +120,9 @@ class StringArray * @param num_elements Number of strings to store in the array. * @param string_size The size of each string in the array. */ - void _allocate_strings(int num_elements, int string_size) + void _allocate_strings(size_t num_elements, size_t string_size) { - for (int i = 0; i < num_elements; ++i) + for (size_t i = 0; i < num_elements; ++i) { // Leave space for \0 terminator: _array[i] = new (std::nothrow) char[string_size + 1];