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/Namespace.cc

    r10624 r11071  
    5353    {
    5454        if (this->bRoot_)
    55             for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
    56                 delete (*it);
     55            for (NamespaceNode* node : this->representingNamespaces_)
     56                delete node;
    5757    }
    5858
     
    8080            for (unsigned int i = 0; i < tokens.size(); i++)
    8181            {
    82                 for (std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)
     82                for (NamespaceNode* node : this->getNamespace()->representingNamespaces_)
    8383                {
    84                     std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);
     84                    std::set<NamespaceNode*> temp = node->getNodeRelative(tokens[i]);
    8585                    this->representingNamespaces_.insert(temp.begin(), temp.end());
    8686                }
     
    9393        if (this->bAutogeneratedFileRootNamespace_)
    9494        {
    95             for (std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)
     95            for (NamespaceNode* node : this->representingNamespaces_)
    9696            {
    97                 (*it)->setRoot(true);
    98                 (*it)->setHidden(true);
     97                node->setRoot(true);
     98                node->setHidden(true);
    9999            }
    100100        }
     
    109109    const BaseObject* Namespace::saveObjects(unsigned int index) const
    110110    {
    111         return 0; // todo
     111        return nullptr; // todo
    112112    }
    113113
    114114    bool Namespace::includes(const Namespace* ns) const
    115115    {
    116         for (std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)
     116        for (NamespaceNode* node1 : this->representingNamespaces_)
    117117        {
    118             for (std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)
     118            for (NamespaceNode* node2 : ns->representingNamespaces_)
    119119            {
    120                 if ((*it1)->includes(*it2))
     120                if (node1->includes(node2))
    121121                {
    122122                    if (this->operator_ == "or")
     
    149149
    150150        int i = 0;
    151         for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
     151        for (NamespaceNode* node : this->representingNamespaces_)
    152152        {
    153153            if (i > 0)
    154154                output += " / ";
    155155
    156             output += (*it)->toString();
     156            output += node->toString();
     157            i++;
    157158        }
    158159
     
    165166
    166167        int i = 0;
    167         for (std::set<NamespaceNode*>::const_iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); i++, ++it)
     168        for (NamespaceNode* node : this->representingNamespaces_)
    168169        {
    169170            if (i > 0)
    170171                output += '\n';
    171172
    172             output += (*it)->toString(indentation);
     173            output += node->toString(indentation);
     174            i++;
    173175        }
    174176
Note: See TracChangeset for help on using the changeset viewer.