Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 16, 2015, 9:59:58 PM (9 years ago)
Author:
landauf
Message:

more checks.

File:
1 edited

Legend:

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

    r10366 r10370  
    5454        this->hierarchyCreatingCounter_s = 0;
    5555        this->classIDCounter_s = 0;
     56        this->recordTraceForIdentifier_ = NULL;
    5657    }
    5758
     
    119120                {
    120121                    this->identifierTraceOfNewObject_.clear();
     122                    this->recordTraceForIdentifier_ = it->second;
     123
    121124                    Identifiable* temp = it->second->fabricate(&temporaryContext);
     125
     126                    this->recordTraceForIdentifier_ = NULL;
     127
    122128                    if (temp->getIdentifier() != it->second)
    123129                        orxout(internal_error) << "Newly created object of type " << it->second->getName() << " has unexpected identifier. Did you forget to use RegisterObject(classname)?" << endl;
     
    209215    {
    210216        if (this->isCreatingHierarchy())
    211             this->identifierTraceOfNewObject_[identifiable].insert(identifiable->getIdentifier());
     217        {
     218            if (this->recordTraceForIdentifier_)
     219            {
     220                if (this->identifierTraceOfNewObject_[identifiable].insert(identifiable->getIdentifier()).second == false)
     221                {
     222                    orxout(internal_warning) << this->recordTraceForIdentifier_->getName() << " inherits two times from " <<
     223                        identifiable->getIdentifier()->getName() << ". Did you forget to use virtual inheritance?" << endl;
     224                }
     225            }
     226        }
    212227        else
    213228            orxout(internal_warning) << "createdObject() called outside of class hierarchy creation" << endl;
Note: See TracChangeset for help on using the changeset viewer.