adamdebreceni commented on a change in pull request #1044:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1044#discussion_r630019575



##########
File path: libminifi/include/core/FlowFile.h
##########
@@ -161,6 +161,15 @@ class FlowFile : public CoreComponent, public 
ReferenceContainer {
   bool setAttribute(const std::string& key, const std::string& value) {
     return attributes_.insert_or_assign(key, value).second;
   }
+  bool setAttribute(std::string&& key, const std::string& value) {
+    return attributes_.insert_or_assign(std::move(key), value).second;
+  }
+  bool setAttribute(const std::string& key, std::string&& value) {
+    return attributes_.insert_or_assign(key, std::move(value)).second;
+  }
+  bool setAttribute(std::string&& key, std::string&& value) {
+    return attributes_.insert_or_assign(std::move(key), 
std::move(value)).second;
+  }

Review comment:
       can we replace these four by two that take the `value` by value, and 
take the `key` by const-ref and rvalue-ref?




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