Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/769#discussion_r83321096
  
    --- Diff: proxy/IPAllow.cc ---
    @@ -287,12 +298,16 @@ IpAllow::BuildTable()
         line = tokLine(NULL, &tok_state);
       }
     
    -  if (_map.getCount() == 0) {
    +  if (_src_map.getCount() == 0 && _dest_map.getCount() == 0) { // TODO: 
check
         Warning("%s No entries in %s. All IP Addresses will be blocked", 
module_name, config_file_path);
       } else {
         // convert the coloring from indices to pointers.
    -    for (IpMap::iterator spot(_map.begin()), limit(_map.end()); spot != 
limit; ++spot) {
    -      spot->setData(&_acls[reinterpret_cast<size_t>(spot->data())]);
    +    for (IpMap::iterator spot(_src_map.begin()), limit(_src_map.end()); 
spot != limit; ++spot) {
    --- End diff --
    
    Well, how about container style for loops?
    ```
        for ( auto& item : _src_map )
          item.setData(&_acls[reinterpret_cast<size_t>(item.data())]);
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to