diff --git a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.cpp b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.cpp index 73981dc546e67..b0345b6a88274 100644 --- a/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.cpp +++ b/onnxruntime/core/providers/dml/OperatorAuthorHelper/OperatorHelper.cpp @@ -57,7 +57,7 @@ namespace OperatorHelper } template - void ExpandToAxes(/*inout*/ std::vector& originalValues, gsl::span axes, std::vector expanded) + void ExpandToAxes(/*inout*/ std::vector& originalValues, const gsl::span axes, std::vector expanded) { assert(originalValues.size() == axes.size()); // Fill in roi and scales/sizes @@ -65,7 +65,7 @@ namespace OperatorHelper { expanded[axes[i]] = originalValues[i]; } - originalValues = expanded; + originalValues = std::move(expanded); } float CastFloat16ToFloat32(uint16_t input)