From 90fae572bb2a0a0e35220b8485824e0d0d4e5a71 Mon Sep 17 00:00:00 2001 From: chenyijie6 Date: Fri, 23 Apr 2021 11:34:46 +0800 Subject: [PATCH] fix pclint warning --- mindspore/ccsrc/pipeline/pynative/pynative_execute.cc | 2 +- mindspore/ccsrc/pipeline/pynative/pynative_execute.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc index d16e0ace82..5446413fcd 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.cc @@ -701,7 +701,7 @@ OpExecInfoPtr ForwardExecutor::GenerateOpExecInfo(const py::args &args) { return op_exec_info; } -bool ForwardExecutor::FindOpMask(py::object obj, std::vector *op_masks, std::string id) { +bool ForwardExecutor::FindOpMask(py::object obj, std::vector *op_masks, const std::string &id) { bool op_mask = false; auto temp = op_mask_map_.find(id); if (temp != op_mask_map_.end()) { diff --git a/mindspore/ccsrc/pipeline/pynative/pynative_execute.h b/mindspore/ccsrc/pipeline/pynative/pynative_execute.h index 9c1a54d8f0..9386c87381 100644 --- a/mindspore/ccsrc/pipeline/pynative/pynative_execute.h +++ b/mindspore/ccsrc/pipeline/pynative/pynative_execute.h @@ -406,7 +406,7 @@ class ForwardExecutor { PynativeStatusCode *status); AnfNodePtr MakeCNode(const OpExecInfoPtr &op_exec_info, std::vector *op_masks, abstract::AbstractBasePtrList *args_spec_list); - bool FindOpMask(py::object obj, std::vector *op_masks, std::string id); + bool FindOpMask(py::object obj, std::vector *op_masks, const std::string &id); void GetArgsSpec(const OpExecInfoPtr &op_exec_info, std::vector *op_masks, std::vector *inputs, abstract::AbstractBasePtrList *args_spec_list); abstract::AbstractBasePtr CheckConstValue(const PrimitivePyPtr &prim, const py::object &obj,