From 1a9d0d9c3296960b3745d8407c40f1ea392f9a4e Mon Sep 17 00:00:00 2001 From: Ori Levari Date: Sun, 29 Dec 2019 17:56:11 -0800 Subject: [PATCH] use correct type for for loop (#2755) --- include/onnxruntime/core/session/onnxruntime_cxx_inline.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h index e1a4449e9a..be2fe6bf9e 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h @@ -361,7 +361,7 @@ template <> inline Value Value::CreateTensor(const OrtMemoryInfo*, std::string* p_data, size_t p_data_element_count, const int64_t* shape, size_t shape_len) { // convert the array of std::string to an array of const char * std::vector string_vector; - for (int i = 0; i < p_data_element_count; ++i) { + for (size_t i = 0; i < p_data_element_count; ++i) { string_vector.push_back(p_data[i].c_str()); } // now make an empty tensor using the default allocator (strings have to make a copy)