@@ -274,8 +274,8 @@ Result<std::shared_ptr<Tensor>> VariableShapeTensorType::MakeTensor(
274274
275275Result<std::shared_ptr<DataType>> VariableShapeTensorType::Make (
276276 const std::shared_ptr<DataType>& value_type, int32_t ndim,
277- const std::vector<int64_t >& permutation, const std::vector<std::string>& dim_names,
278- const std::vector<std::optional<int64_t >>& uniform_shape) {
277+ std::vector<int64_t > permutation, std::vector<std::string> dim_names,
278+ std::vector<std::optional<int64_t >> uniform_shape) {
279279 if (!is_fixed_width (*value_type)) {
280280 return Status::Invalid (" Cannot convert non-fixed-width values to Tensor." );
281281 }
@@ -306,16 +306,18 @@ Result<std::shared_ptr<DataType>> VariableShapeTensorType::Make(
306306 RETURN_NOT_OK (internal::IsPermutationValid (permutation));
307307 }
308308
309- return std::make_shared<VariableShapeTensorType>(value_type, ndim, permutation,
310- dim_names, uniform_shape);
309+ return std::make_shared<VariableShapeTensorType>(
310+ value_type, ndim, std::move (permutation), std::move (dim_names),
311+ std::move (uniform_shape));
311312}
312313
313314std::shared_ptr<DataType> variable_shape_tensor (
314315 const std::shared_ptr<DataType>& value_type, int32_t ndim,
315- const std::vector<int64_t >& permutation, const std::vector<std::string>& dim_names,
316- const std::vector<std::optional<int64_t >>& uniform_shape) {
317- auto maybe_type = VariableShapeTensorType::Make (value_type, ndim, permutation,
318- dim_names, uniform_shape);
316+ std::vector<int64_t > permutation, std::vector<std::string> dim_names,
317+ std::vector<std::optional<int64_t >> uniform_shape) {
318+ auto maybe_type = VariableShapeTensorType::Make (
319+ value_type, ndim, std::move (permutation), std::move (dim_names),
320+ std::move (uniform_shape));
319321 ARROW_CHECK_OK (maybe_type.status ());
320322 return maybe_type.MoveValueUnsafe ();
321323}
0 commit comments