From 2857183da5ea6e6ad73fab36e0327403e48f4b6d Mon Sep 17 00:00:00 2001 From: mengyuanli Date: Wed, 26 Jan 2022 09:40:50 +0800 Subject: [PATCH] sync code clean to master --- mindspore/lite/src/inner_kernel.h | 2 +- mindspore/lite/src/lite_model.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mindspore/lite/src/inner_kernel.h b/mindspore/lite/src/inner_kernel.h index 2794a962a60..f9832c2eb61 100644 --- a/mindspore/lite/src/inner_kernel.h +++ b/mindspore/lite/src/inner_kernel.h @@ -167,7 +167,7 @@ class InnerKernel : public Kernel { virtual bool IsTrainable() const { return this->trainable_; } - TypeId registry_data_type(void) { return registry_data_type_; } + TypeId registry_data_type(void) const { return registry_data_type_; } void set_registry_data_type(TypeId data_type) { registry_data_type_ = data_type; } diff --git a/mindspore/lite/src/lite_model.cc b/mindspore/lite/src/lite_model.cc index 56d9c7320d5..b078b00467e 100644 --- a/mindspore/lite/src/lite_model.cc +++ b/mindspore/lite/src/lite_model.cc @@ -233,7 +233,7 @@ int LiteModel::NodeVerify() const { MS_LOG(ERROR) << "Index of node->output_indices_ is beyond size."; return RET_ERROR; } - if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(), [&](const uint32_t &idx) { + if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(), [&, this](const uint32_t &idx) { return this->all_tensors_[idx]->nodeType() == NodeType_ValueNode && this->all_tensors_[idx]->data() != nullptr; })) { @@ -312,7 +312,7 @@ int LiteModel::SubGraphVerify() const { } int LiteModel::SubGraphInOutVerify(const Model::SubGraph *graph) const { - auto from_node = [&](uint32_t cur_idx) -> bool { + auto from_node = [&, this](uint32_t cur_idx) -> bool { for (auto node_idx : graph->node_indices_) { auto node = this->all_nodes_.at(node_idx); if (std::any_of(node->output_indices_.begin(), node->output_indices_.end(),