Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10375 for code


Ignore:
Timestamp:
Apr 19, 2015, 10:07:27 PM (10 years ago)
Author:
landauf
Message:

trying to keep the correct order of parents

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core7/src/libraries/core/class/Identifier.cc

    r10374 r10375  
    202202
    203203            // direct parents and their parents are also parents of this identifier (but only add them once)
    204             this->parents_ = this->directParents_;
    205204            for (std::list<const Identifier*>::const_iterator it_parent = this->directParents_.begin(); it_parent != this->directParents_.end(); ++it_parent)
     205            {
    206206                for (std::list<const Identifier*>::const_iterator it_parent_parent = const_cast<Identifier*>(*it_parent)->parents_.begin(); it_parent_parent != const_cast<Identifier*>(*it_parent)->parents_.end(); ++it_parent_parent)
    207207                    if (std::find(this->parents_.begin(), this->parents_.end(), *it_parent_parent) == this->parents_.end())
    208208                        this->parents_.push_back(*it_parent_parent);
     209                if (std::find(this->parents_.begin(), this->parents_.end(), *it_parent) == this->parents_.end())
     210                    this->parents_.push_back(*it_parent);
     211            }
    209212        }
    210213        else if (!this->isExactlyA(Class(Identifiable)))
Note: See TracChangeset for help on using the changeset viewer.