szaszm commented on a change in pull request #865:
URL: https://github.com/apache/nifi-minifi-cpp/pull/865#discussion_r467095002



##########
File path: libminifi/include/core/ProcessGroup.h
##########
@@ -199,10 +199,26 @@ class ProcessGroup {
   void removeProcessGroup(ProcessGroup *child);
   // ! Add connections
   void addConnection(std::shared_ptr<Connection> connection);
+  // Generic find
+  template <typename Fun>
+  std::shared_ptr<Processor> findProcessor(Fun&& condition) const {

Review comment:
       I don't see the benefit of taking the function by forwarding reference 
and not forwarding it. Please note that forwarding is not possible (because of 
multiple usages of the function and we shouldn't call a moved-from function 
object) and it doesn't have a large benefit when we are not returning the 
function object.
   I suggest copying the function object or if there is a reason for taking it 
by forwarding reference, please explain.




----------------------------------------------------------------
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.

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


Reply via email to