void Sector::removeSector(string sectorName){ Sector* tmp; for(vector<Sector*>::iterator it = _children.begin();it!=_children.end();++it){ tmp = *it; if (tmp->getName().compare(sectorName)==0) { _children.erase(it); tmp->setSuperior(NULL); tmp->release(); break; } } tmp=NULL; }
void Sector::removeSector(Sector* s){ Sector* tmp; for(vector<Sector*>::iterator it = _children.begin();it!=_children.end();++it){ tmp = *it; if (tmp == s) { _children.erase(it); tmp->setSuperior(NULL); tmp->release(); break; } } tmp = NULL; }