- Timestamp:
- Dec 5, 2015, 10:47:51 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/libraries/core/ClassTreeMask.cc
r10916 r10919 915 915 916 916 // Iterate through all subnodes 917 for ( std::list<ClassTreeMaskNode*>::iterator it1 = node->subnodes_.begin(); it1 != node->subnodes_.end(); ++it1)917 for (ClassTreeMaskNode* subnode : node->subnodes_) 918 918 { 919 919 // Recursive call to this function with the subnode 920 this->create( *it1);920 this->create(subnode); 921 921 922 922 // Only execute the following code if the current node is included, meaning some of the subnodes might be included too … … 926 926 927 927 // Iterate through all direct children 928 for (std::set<const Identifier*>::iterator it 2 = directChildren.begin(); it2 != directChildren.end(); ++it2)928 for (std::set<const Identifier*>::iterator it = directChildren.begin(); it != directChildren.end(); ++it) 929 929 { 930 930 // Check if the subnode (it1) is a child of the directChild (it2) 931 if ( (*it1)->getClass()->isA(*it2))931 if (subnode->getClass()->isA(*it)) 932 932 { 933 933 // Yes it is - remove the directChild (it2) from the list, because it will already be handled by a recursive call to the create() function 934 directChildren.erase(it 2);934 directChildren.erase(it); 935 935 936 936 // Check if the removed directChild was exactly the subnode 937 if (! (*it1)->getClass()->isExactlyA(*it2))937 if (!subnode->getClass()->isExactlyA(*it)) 938 938 { 939 939 // No, it wasn't exactly the subnode - therefore there are some classes between 940 940 941 941 // Add the previously removed directChild (it2) to the subclass-list 942 this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it 2, true));942 this->subclasses_.insert(this->subclasses_.end(), std::pair<const Identifier*, bool>(*it, true)); 943 943 944 944 // Insert all directChildren of the directChild 945 directChildren.insert((*it 2)->getDirectChildren().begin(), (*it2)->getDirectChildren().end());945 directChildren.insert((*it)->getDirectChildren().begin(), (*it)->getDirectChildren().end()); 946 946 947 947 // Restart the scan with the expanded set of directChildren
Note: See TracChangeset
for help on using the changeset viewer.