From 5db0b520c4b48690ac9ca375af39fc28d8d62cfa Mon Sep 17 00:00:00 2001 From: Scott McKay Date: Thu, 16 Jan 2025 20:59:40 +1000 Subject: [PATCH] Fix x86 build --- include/onnxruntime/core/session/onnxruntime_cxx_inline.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h index de1ab81080..83374ae7ab 100644 --- a/include/onnxruntime/core/session/onnxruntime_cxx_inline.h +++ b/include/onnxruntime/core/session/onnxruntime_cxx_inline.h @@ -1118,7 +1118,7 @@ std::vector ConstSessionImpl::GetInputs() const { std::vector inputs; inputs.reserve(input_names.size()); - for (int i = 0; i < input_names.size(); ++i) { + for (size_t i = 0; i < input_names.size(); ++i) { auto type_info = GetInputTypeInfo(i); inputs.emplace_back(ModelBuilderAPI::ValueInfo{input_names[i], type_info.GetConst()}); } @@ -1133,7 +1133,7 @@ std::vector ConstSessionImpl::GetOutputs() const std::vector outputs; outputs.reserve(output_names.size()); - for (int i = 0; i < output_names.size(); ++i) { + for (size_t i = 0; i < output_names.size(); ++i) { auto type_info = GetOutputTypeInfo(i); outputs.emplace_back(ModelBuilderAPI::ValueInfo{output_names[i], type_info.GetConst()}); }