szaszm commented on code in PR #2029:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2029#discussion_r2372016566


##########
extensions/systemd/ConsumeJournald.cpp:
##########
@@ -78,7 +78,7 @@ void ConsumeJournald::onSchedule(core::ProcessContext& 
context, core::ProcessSes
     return process_old_messages ? journal.seekHead() : journal.seekTail();
   };
   worker_->enqueue([this, &seek_default] {
-    const auto cursor = state_manager_->get() | 
utils::transform([](std::unordered_map<std::string, std::string>&& m) { return 
m.at(CURSOR_KEY); });
+    const auto cursor = state_manager_->get() | utils::transform([](const 
std::unordered_map<std::string, std::string>& m) { return m.at(CURSOR_KEY); });

Review Comment:
   I forgot about the fact that the effective type of rvalue ref parameter 
variables within the function body is mutable lvalue refs. I guess it's fine 
either way.



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