Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 26, 2010, 4:05:45 PM (14 years ago)
Author:
kolibri7
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/lod/src/orxonox/Level.cc

    r6691 r6786  
    141141   
    142142    //LoD
    143     void Level::addLodInfo(const MeshLodInformation* lodInformation)
     143    void Level::addLodInfo(MeshLodInformation* lodInformation)
    144144    {
    145145//              std::pair<std::map<std::string,MeshLodInformation*>::iterator,bool> it
    146146//                  = new std::pair<lodInformation->getMeshName(),lodInformation>;
    147         this->lodInformation_.insert(std::pair<lodInformation->getMeshName(),lodInformation>);
     147                std::string meshName = lodInformation->getMeshName();
     148        this->lodInformation_.insert(std::make_pair(meshName,lodInformation));
     149                //this->lodInformation_[std::make_pair<meshName,lodInformation>);
    148150    }
    149151
    150     MeshLodInformation* Level::getLodInfo(string meshName) const
     152    const MeshLodInformation* Level::getLodInfo(std::string meshName) const
    151153    {
    152         if(this->lodInformation_.find(meshName)!=std::map::end)
    153             return this->lodInformation_.find(meshName);
     154        if(this->lodInformation_.find(meshName)!=this->lodInformation_.end())
     155            return this->lodInformation_.find(meshName)->second;
    154156       
    155157        return 0;
Note: See TracChangeset for help on using the changeset viewer.