Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 26, 2009, 10:25:03 PM (16 years ago)
Author:
landauf
Message:

replaced delete with destroy() in orxonox

Location:
code/branches/core5/src/orxonox/weaponsystem
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/weaponsystem/Weapon.cc

    r5738 r5801  
    6262
    6363            for (std::multimap<unsigned int, WeaponMode*>::iterator it = this->weaponmodes_.begin(); it != this->weaponmodes_.end(); ++it)
    64                 delete it->second;
     64                it->second->destroy();
    6565        }
    6666    }
  • code/branches/core5/src/orxonox/weaponsystem/WeaponPack.cc

    r5738 r5801  
    5454
    5555            while (!this->weapons_.empty())
    56                 delete (*this->weapons_.begin());
     56                (*this->weapons_.begin())->destroy();
    5757
    5858            for (std::set<DefaultWeaponmodeLink*>::iterator it = this->links_.begin(); it != this->links_.end(); )
    59                 delete (*(it++));
     59                (*(it++))->destroy();
    6060        }
    6161    }
  • code/branches/core5/src/orxonox/weaponsystem/WeaponSystem.cc

    r5738 r5801  
    6262
    6363            while (!this->weaponSets_.empty())
    64                 delete (this->weaponSets_.begin()->second);
     64                this->weaponSets_.begin()->second->destroy();
    6565
    6666            while (!this->weaponPacks_.empty())
    67                 delete (*this->weaponPacks_.begin());
     67                (*this->weaponPacks_.begin())->destroy();
    6868
    6969            while (!this->weaponSlots_.empty())
    70                 delete (*this->weaponSlots_.begin());
     70                (*this->weaponSlots_.begin())->destroy();
    7171
    7272            while (!this->munitions_.empty())
    73                 { delete (this->munitions_.begin()->second); this->munitions_.erase(this->munitions_.begin()); }
     73                { this->munitions_.begin()->second->destroy(); this->munitions_.erase(this->munitions_.begin()); }
    7474        }
    7575    }
Note: See TracChangeset for help on using the changeset viewer.