From f59a44e24feec730bcb145bd5f377ce07f4cae9e Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Wed, 31 Aug 2022 11:47:43 -0700 Subject: [PATCH] Build VS 2022 no Abseil adjustment (#12780) Build VS 2022 no Abseil --- onnxruntime/core/framework/ort_value_name_idx_map.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/onnxruntime/core/framework/ort_value_name_idx_map.h b/onnxruntime/core/framework/ort_value_name_idx_map.h index 6035dc4e85..1b5f6bcee9 100644 --- a/onnxruntime/core/framework/ort_value_name_idx_map.h +++ b/onnxruntime/core/framework/ort_value_name_idx_map.h @@ -33,7 +33,11 @@ class OrtValueNameIdxMap { common::Status GetIdx(std::string_view name, int& idx) const { idx = -1; +#ifdef DISABLE_ABSEIL + auto it = map_.find(std::string(name)); +#else auto it = map_.find(name); +#endif if (it == map_.end()) { return ORT_MAKE_STATUS(ONNXRUNTIME, FAIL, "Could not find OrtValue with name '", name, "'"); }