From b02f4ece5e4f48f5d303d6be0170c03d60b24efb Mon Sep 17 00:00:00 2001 From: Dwayne Robinson Date: Fri, 28 Jan 2022 14:25:12 -0800 Subject: [PATCH] Remove cbegin and cend calls which do not exist in std::span or gsl::span (#10426) --- include/onnxruntime/core/framework/tensor_shape.h | 2 +- onnxruntime/core/framework/op_node_proto_helper.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/onnxruntime/core/framework/tensor_shape.h b/include/onnxruntime/core/framework/tensor_shape.h index 4db6b58adc..ef0cfcfa01 100644 --- a/include/onnxruntime/core/framework/tensor_shape.h +++ b/include/onnxruntime/core/framework/tensor_shape.h @@ -43,7 +43,7 @@ using InlinedShapeVector = absl::InlinedVector& span) { TensorShapeVector out; out.reserve(span.size()); - out.assign(span.cbegin(), span.cend()); + out.assign(span.begin(), span.end()); return out; } diff --git a/onnxruntime/core/framework/op_node_proto_helper.cc b/onnxruntime/core/framework/op_node_proto_helper.cc index 7268e957b2..960c997124 100644 --- a/onnxruntime/core/framework/op_node_proto_helper.cc +++ b/onnxruntime/core/framework/op_node_proto_helper.cc @@ -186,7 +186,7 @@ MUST_USE_RESULT Status OpNodeProtoHelper::GetAttrs(const std::string& na Status status = this->GetAttrsAsSpan(name, span); if (status.IsOK()) { out.reserve(span.size()); - out.assign(span.cbegin(), span.cend()); + out.assign(span.begin(), span.end()); } return status; }