From 7e19f6699c04a3b4e3a20ba2636627eb9354d5ef Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 19 Dec 2020 15:50:35 +0000 Subject: Disable misc-no-recursion on Slice search functions --- icespider/compile/routeCompiler.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/icespider/compile/routeCompiler.cpp b/icespider/compile/routeCompiler.cpp index 8b357ba..7f5ddd6 100644 --- a/icespider/compile/routeCompiler.cpp +++ b/icespider/compile/routeCompiler.cpp @@ -35,20 +35,19 @@ namespace IceSpider { } Slice::OperationPtr + // NOLINTNEXTLINE(misc-no-recursion) RouteCompiler::findOperation(const std::string & on, const Slice::ContainerPtr & c, const Ice::StringSeq & ns) { for (const auto & cls : c->classes()) { auto fqcn = ns + cls->name(); for (const auto & op : cls->allOperations()) { - auto fqon = boost::algorithm::join(fqcn + op->name(), "."); - if (fqon == on) { + if (boost::algorithm::join(fqcn + op->name(), ".") == on) { return op; } } } for (const auto & m : c->modules()) { - auto op = findOperation(on, m, ns + m->name()); - if (op) { + if (auto op = findOperation(on, m, ns + m->name())) { return op; } } @@ -56,11 +55,11 @@ namespace IceSpider { } Slice::OperationPtr + // NOLINTNEXTLINE(misc-no-recursion) RouteCompiler::findOperation(const std::string & on, const Units & us) { for (const auto & u : us) { - auto op = findOperation(on, u.second); - if (op) { + if (auto op = findOperation(on, u.second)) { return op; } } @@ -68,6 +67,7 @@ namespace IceSpider { } std::optional + // NOLINTNEXTLINE(misc-no-recursion) RouteCompiler::findType(const std::string & tn, const Slice::ContainerPtr & c, const Ice::StringSeq & ns) { for (const auto & strct : c->structs()) { -- cgit v1.2.3