diff --git a/onnxruntime/core/graph/model.cc b/onnxruntime/core/graph/model.cc index 2d2f65f41ed21..67b73e68b0bfb 100644 --- a/onnxruntime/core/graph/model.cc +++ b/onnxruntime/core/graph/model.cc @@ -28,7 +28,7 @@ namespace onnxruntime { Model::Model(const std::string& graph_name, bool is_onnx_domain_only, const ModelMetaData& model_metadata, - const IOnnxRuntimeOpSchemaRegistryList local_registries, + const IOnnxRuntimeOpSchemaRegistryList& local_registries, const std::unordered_map& domain_to_version, const std::vector& model_functions) { model_proto_ = std::make_unique(); diff --git a/onnxruntime/core/graph/model.h b/onnxruntime/core/graph/model.h index f7e510fe3438b..4eac1f2e8afb3 100644 --- a/onnxruntime/core/graph/model.h +++ b/onnxruntime/core/graph/model.h @@ -26,7 +26,7 @@ class Model { explicit Model(const std::string& graph_name, bool is_onnx_domain_only = false, const ModelMetaData& model_metadata = ModelMetaData(), - const IOnnxRuntimeOpSchemaRegistryList local_registries = {}, + const IOnnxRuntimeOpSchemaRegistryList& local_registries = IOnnxRuntimeOpSchemaRegistryList(), const std::unordered_map& domain_to_version = {}, const std::vector& model_specific_functions = {});