Build VS 2022 no Abseil adjustment (#12780)

Build VS 2022 no Abseil
This commit is contained in:
Dmitri Smirnov 2022-08-31 11:47:43 -07:00 committed by GitHub
parent cc94ba7740
commit f59a44e24f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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, "'");
}