Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 17, 2016, 10:29:21 PM (8 years ago)
Author:
landauf
Message:

merged branch cpp11_v3 back to trunk

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/libraries/core/NamespaceNode.cc

    r8858 r11071  
    103103                bool bFoundMatchingNamespace = false;
    104104
    105                 for (std::map<std::string, NamespaceNode*>::iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
     105                for (const auto& mapEntry : this->subnodes_)
    106106                {
    107                     if (it->first.find(firstPart) == (it->first.size() - firstPart.size()))
     107                    if (mapEntry.first.find(firstPart) == (mapEntry.first.size() - firstPart.size()))
    108108                    {
    109                         std::set<NamespaceNode*> temp2 = it->second->getNodeRelative(secondPart);
     109                        std::set<NamespaceNode*> temp2 = mapEntry.second->getNodeRelative(secondPart);
    110110                        nodes.insert(temp2.begin(), temp2.end());
    111111                        bFoundMatchingNamespace = true;
     
    132132        else
    133133        {
    134             for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
    135                 if (it->second->includes(ns))
     134            for (const auto& mapEntry : this->subnodes_)
     135                if (mapEntry.second->includes(ns))
    136136                    return true;
    137137        }
     
    149149
    150150            int i = 0;
    151             for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); i++, ++it)
     151            for (const auto& mapEntry : this->subnodes_)
    152152            {
    153153                if (i > 0)
    154154                    output += ", ";
    155155
    156                 output += it->second->toString();
     156                output += mapEntry.second->toString();
     157                i++;
    157158            }
    158159
     
    167168        std::string output = (indentation + this->name_ + '\n');
    168169
    169         for (std::map<std::string, NamespaceNode*>::const_iterator it = this->subnodes_.begin(); it != this->subnodes_.end(); ++it)
    170             output += it->second->toString(indentation + "  ");
     170        for (const auto& mapEntry : this->subnodes_)
     171            output += mapEntry.second->toString(indentation + "  ");
    171172
    172173        return output;
Note: See TracChangeset for help on using the changeset viewer.