bneradt commented on a change in pull request #7708:
URL: https://github.com/apache/trafficserver/pull/7708#discussion_r614141956



##########
File path: plugins/experimental/parent_select/consistenthash_config.cc
##########
@@ -108,8 +108,8 @@ createStrategiesFromFile(const char *file)
 
     // std::map<std::string, TSNextHopSelectionStrategy*, std::less<>>
     strategies_map strategiesMap;
-    for (unsigned int i = 0; i < strategies.size(); ++i) {
-      YAML::Node strategy = strategies[i];
+    for (auto &&strategie : strategies) {

Review comment:
       strategie -> strategy

##########
File path: plugins/experimental/parent_select/parent_select.cc
##########
@@ -373,14 +373,14 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, 
char *errbuff, int errbuff
 
   std::unique_ptr<TSNextHopSelectionStrategy> strategy;
 
-  for (auto it = file_strategies.begin(); it != file_strategies.end(); it++) {
+  for (auto &file_strategie : file_strategies) {

Review comment:
       Ha: strategie. :) It took the 's' off to make it singular.
   
   Beyond that, it looks like first and second are both used in the loop. Since 
we're using range-based for, can we used a structured bind on this map? 
Something like:
   
   `for (auto &[name, strategy]: file_strategies)`




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