Commit 2e8b5c3d authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Improved the update_references() function.

parent 8a980260
......@@ -23,7 +23,7 @@ class COpendriveSignal
double scale_factor;
protected:
void load(signals::signal_type &signal_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:
COpendriveSignal();
......
......@@ -48,9 +48,10 @@ void COpendriveSignal::load(signals::signal_type &signal_info,COpendriveRoadSegm
this->segment=segment;
}
void COpendriveSignal::update_references(std::map<COpendriveRoadSegment *,COpendriveRoadSegment *> &segment_refs)
void COpendriveSignal::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 COpendriveSignal::set_scale_factor(double scale)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment