diff --git a/parser/common/parser_fp16_t.h b/parser/common/parser_fp16_t.h index a8bf36f..917312c 100644 --- a/parser/common/parser_fp16_t.h +++ b/parser/common/parser_fp16_t.h @@ -305,7 +305,7 @@ public: /// @ingroup fp16_t constructor /// @brief Constructor with an uint16_t value - TagFp16(const uint16_t &ui_val) : val(ui_val) {} + explicit TagFp16(const uint16_t &ui_val) : val(ui_val) {} /// @ingroup fp16_t constructor /// @brief Constructor with a fp16_t object(copy constructor) diff --git a/parser/common/register_tbe.cc b/parser/common/register_tbe.cc index c2d86c6..50fb631 100644 --- a/parser/common/register_tbe.cc +++ b/parser/common/register_tbe.cc @@ -97,7 +97,7 @@ bool OpRegistrationTbe::RegisterParser(const OpRegistrationData ®_data) { return false; } OpParserRegisterar registerar __attribute__((unused)) = OpParserRegisterar( - domi::TENSORFLOW, GetOmOptype(reg_data), [=]() -> std::shared_ptr { return tf_parser_adapter; }); + domi::TENSORFLOW, GetOmOptype(reg_data), [tf_parser_adapter]() -> std::shared_ptr { return tf_parser_adapter; }); } if (reg_data.GetFusionParseParamFn() != nullptr || reg_data.GetFusionParseParamByOpFn() != nullptr) { bool is_registed = factory->OpParserIsRegistered(GetOmOptype(reg_data), true); @@ -115,7 +115,7 @@ bool OpRegistrationTbe::RegisterParser(const OpRegistrationData ®_data) { } OpParserRegisterar registerar __attribute__((unused)) = OpParserRegisterar( domi::TENSORFLOW, GetOmOptype(reg_data), - [=]() -> std::shared_ptr { return tf_fusion_parser_adapter; }, true); + [tf_fusion_parser_adapter]() -> std::shared_ptr { return tf_fusion_parser_adapter; }, true); } } else { std::shared_ptr factory = OpParserFactory::Instance(reg_data.GetFrameworkType()); diff --git a/parser/onnx/subgraph_adapter/if_subgraph_adapter.cc b/parser/onnx/subgraph_adapter/if_subgraph_adapter.cc index 6248e0a..23b859c 100644 --- a/parser/onnx/subgraph_adapter/if_subgraph_adapter.cc +++ b/parser/onnx/subgraph_adapter/if_subgraph_adapter.cc @@ -14,8 +14,8 @@ * limitations under the License. */ -#include #include "if_subgraph_adapter.h" +#include #include "subgraph_adapter_factory.h" #include "common/util.h" #include "framework/common/debug/ge_log.h"