From 5eb8c5400f61e7d2b019c44062db59c71ec4391c Mon Sep 17 00:00:00 2001 From: linyanfeng Date: Thu, 2 Jun 2022 10:00:30 +0800 Subject: [PATCH] add noexcept for OpParserRegisterar class` --- parser/common/op_parser_factory.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/parser/common/op_parser_factory.h b/parser/common/op_parser_factory.h index 99967d5..df36eb0 100644 --- a/parser/common/op_parser_factory.h +++ b/parser/common/op_parser_factory.h @@ -122,7 +122,7 @@ class OpParserRegisterar { * @param [in] fun Creator function corresponding to Op */ OpParserRegisterar(const domi::FrameworkType framework, const std::string &op_type, OpParserFactory::CREATOR_FUN fun, - bool is_fusion_op = false) { + bool is_fusion_op = false) noexcept { OpParserFactory::Instance(framework)->RegisterCreator(op_type, fun, is_fusion_op); } ~OpParserRegisterar() {} @@ -145,7 +145,8 @@ class CustomParserAdapterRegistry { // Register Creator function for the custom custom operator ParserAdapter class CustomParserAdapterRegistrar { public: - CustomParserAdapterRegistrar(const domi::FrameworkType framework, CustomParserAdapterRegistry::CREATOR_FUN fun) { + CustomParserAdapterRegistrar(const domi::FrameworkType framework, + CustomParserAdapterRegistry::CREATOR_FUN fun) noexcept { CustomParserAdapterRegistry::Instance()->Register(framework, fun); } ~CustomParserAdapterRegistrar() {}