use correct type for for loop (#2755)

This commit is contained in:
Ori Levari 2019-12-29 17:56:11 -08:00 committed by Scott McKay
parent 185447f0e5
commit 1a9d0d9c32

View file

@ -361,7 +361,7 @@ template <>
inline Value Value::CreateTensor<std::string>(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<const char*> 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)