lordgamez commented on code in PR #1354:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1354#discussion_r926468702


##########
libminifi/src/core/Processor.cpp:
##########
@@ -304,18 +303,13 @@ bool Processor::isThrottledByBackpressure() const {
     }
     return false;
   })();
-  bool isForcedByIncomingCycle = ([&] {
-    for (auto &inConn : incoming_connections_) {
-      auto connection = dynamic_cast<Connection*>(inConn);
-      if (!connection) {
-        continue;
-      }
-      if (partOfCycle(connection) && connection->isFull()) {
-        return true;
-      }
+  bool isForcedByIncomingCycle = ranges::any_of(incoming_connections_, 
[&](auto& inConn) {
+    auto connection = dynamic_cast<Connection*>(inConn);
+    if (!connection) {
+      return false;
     }
-    return false;
-  })();
+    return partOfCycle(connection) && connection->isFull();

Review Comment:
   Good point, updated in d3b1db61b23d80b28385fde5f77af73c4661b95a



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to