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



##########
File path: libminifi/src/core/ProcessGroup.cpp
##########
@@ -92,13 +92,12 @@ ProcessGroup::~ProcessGroup() {
     onScheduleTimer_->stop();
   }
 
-  for (auto &&connection : connections_) {
+  for (auto&& connection : connections_) {

Review comment:
       That's a forwarding reference, because `auto` uses template deduction 
rules. In other words, "I don't care what it is, bind a reference to it" 
reference.
   In this case it will be a const lvalue reference, because:
   1. `auto&&`
   2. `const std::shared_ptr<Connection>& &&` after deducing `auto` (note: 
`connections_` is a `std::set`, which only has const iterators)
   3. `const std::shared_ptr<Connection>&` after reference-collapsing
   
   Normally I point out that `const auto&` or `auto&` would be more explicit 
and readable, but since this is old code with just a space change, I didn't 
want to bother @adamdebreceni with this.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to