Changeset 11071 for code/trunk/src/libraries/core/Namespace.cc
- Timestamp:
- Jan 17, 2016, 10:29:21 PM (8 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/libraries/core/Namespace.cc
r10624 r11071 53 53 { 54 54 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; 57 57 } 58 58 … … 80 80 for (unsigned int i = 0; i < tokens.size(); i++) 81 81 { 82 for ( std::set<NamespaceNode*>::iterator it = this->getNamespace()->representingNamespaces_.begin(); it != this->getNamespace()->representingNamespaces_.end(); ++it)82 for (NamespaceNode* node : this->getNamespace()->representingNamespaces_) 83 83 { 84 std::set<NamespaceNode*> temp = (*it)->getNodeRelative(tokens[i]);84 std::set<NamespaceNode*> temp = node->getNodeRelative(tokens[i]); 85 85 this->representingNamespaces_.insert(temp.begin(), temp.end()); 86 86 } … … 93 93 if (this->bAutogeneratedFileRootNamespace_) 94 94 { 95 for ( std::set<NamespaceNode*>::iterator it = this->representingNamespaces_.begin(); it != this->representingNamespaces_.end(); ++it)95 for (NamespaceNode* node : this->representingNamespaces_) 96 96 { 97 (*it)->setRoot(true);98 (*it)->setHidden(true);97 node->setRoot(true); 98 node->setHidden(true); 99 99 } 100 100 } … … 109 109 const BaseObject* Namespace::saveObjects(unsigned int index) const 110 110 { 111 return 0; // todo111 return nullptr; // todo 112 112 } 113 113 114 114 bool Namespace::includes(const Namespace* ns) const 115 115 { 116 for ( std::set<NamespaceNode*>::const_iterator it1 = this->representingNamespaces_.begin(); it1 != this->representingNamespaces_.end(); ++it1)116 for (NamespaceNode* node1 : this->representingNamespaces_) 117 117 { 118 for ( std::set<NamespaceNode*>::const_iterator it2 = ns->representingNamespaces_.begin(); it2 != ns->representingNamespaces_.end(); ++it2)118 for (NamespaceNode* node2 : ns->representingNamespaces_) 119 119 { 120 if ( (*it1)->includes(*it2))120 if (node1->includes(node2)) 121 121 { 122 122 if (this->operator_ == "or") … … 149 149 150 150 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_) 152 152 { 153 153 if (i > 0) 154 154 output += " / "; 155 155 156 output += (*it)->toString(); 156 output += node->toString(); 157 i++; 157 158 } 158 159 … … 165 166 166 167 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_) 168 169 { 169 170 if (i > 0) 170 171 output += '\n'; 171 172 172 output += (*it)->toString(indentation); 173 output += node->toString(indentation); 174 i++; 173 175 } 174 176
Note: See TracChangeset
for help on using the changeset viewer.