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


##########
extensions/libarchive/BinFiles.cpp:
##########
@@ -97,8 +97,8 @@ void BinFiles::preprocessFlowFile(core::ProcessContext* 
/*context*/, core::Proce
 void BinManager::gatherReadyBins() {
   std::lock_guard < std::mutex > lock(mutex_);
   std::vector< std::string > emptyQueue;
-  for (std::map<std::string, std::unique_ptr<std::deque<std::unique_ptr<Bin>>> 
>::iterator it=groupBinMap_.begin(); it !=groupBinMap_.end(); ++it) {
-    std::unique_ptr < std::deque<std::unique_ptr<Bin>>>&queue = it->second;
+  for (auto& kvp : groupBinMap_) {
+    auto &queue = kvp.second;

Review Comment:
   This is the perfect use case for structured bindings.
   ```suggestion
     for (auto& [key, queue] : groupBinMap_) {
   ```



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