File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -263,25 +263,23 @@ std::unique_ptr<TreeNode> BehaviorTreeFactory::instantiateTreeNode(
263263 substituted = true ;
264264 break ;
265265 }
266- // NOLINTNEXTLINE(readability-else-after-return)
267- else if (const auto * const test_config = std::get_if<TestNodeConfig>(&rule))
266+
267+ if (const auto * const test_config = std::get_if<TestNodeConfig>(&rule))
268268 {
269269 node = std::make_unique<TestNode>(name, config,
270270 std::make_shared<TestNodeConfig>(*test_config));
271271 substituted = true ;
272272 break ;
273273 }
274- else if (const auto * const test_config =
275- std::get_if<std::shared_ptr<TestNodeConfig>>(&rule))
274+
275+ if (const auto * const test_config =
276+ std::get_if<std::shared_ptr<TestNodeConfig>>(&rule))
276277 {
277278 node = std::make_unique<TestNode>(name, config, *test_config);
278279 substituted = true ;
279280 break ;
280281 }
281- else
282- {
283- throw LogicError (" Substitution rule is not a string or a TestNodeConfig" );
284- }
282+ throw LogicError (" Substitution rule is not a string or a TestNodeConfig" );
285283 }
286284 }
287285
You can’t perform that action at this time.
0 commit comments