hunyadi-dev commented on a change in pull request #870:
URL: https://github.com/apache/nifi-minifi-cpp/pull/870#discussion_r470123463



##########
File path: extensions/libarchive/MergeContent.cpp
##########
@@ -342,6 +352,50 @@ std::shared_ptr<core::FlowFile> 
ZipMerge::merge(core::ProcessContext *context, c
   return flowFile;
 }
 
+void AttributeMerger::mergeAttributes(core::ProcessSession *session, 
std::shared_ptr<core::FlowFile> &merge_flow) {
+  for (const auto& pair : getMergedAttributes()) {
+    session->putAttribute(merge_flow, pair.first, pair.second);
+  }
+}
+
+std::map<std::string, std::string> AttributeMerger::getMergedAttributes() {
+  std::map<std::string, std::string> merged_attributes;

Review comment:
       You mean this move?
   ![Screenshot 2020-08-13 at 18 23 
20](https://user-images.githubusercontent.com/64011968/90160450-11b10900-dd92-11ea-8515-eaf0ca020af9.png)
   The lambda captures by reference, so it should not be a problem.
   
   The assembly generated is also the same, see here:
   https://quick-bench.com/q/J7uVr8A_Ib62WQrJm9QXm7zK5Wo
   




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