Skip to content
Snippets Groups Projects
Commit 8a980260 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Improved the update_references() function.

parent 5a3a24f8
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class COpendriveObject
double scale_factor;
protected:
void load(objects::object_type &object_info,COpendriveRoadSegment *segment);
void update_references(std::map<COpendriveRoadSegment *,COpendriveRoadSegment *> &segment_refs);
void update_references(segment_up_ref_t &segment_refs);
void set_scale_factor(double scale);
public:
COpendriveObject();
......
......@@ -108,9 +108,10 @@ void COpendriveObject::load(objects::object_type &object_info,COpendriveRoadSegm
this->segment=segment;
}
void COpendriveObject::update_references(std::map<COpendriveRoadSegment *,COpendriveRoadSegment *> &segment_refs)
void COpendriveObject::update_references(segment_up_ref_t &segment_refs)
{
this->segment=segment_refs[this->segment];
if(segment_refs.find(this->segment)!=segment_refs.end())
this->segment=segment_refs[this->segment];
}
void COpendriveObject::set_scale_factor(double scale)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment