Skip to content

Commit 7ccdcf3

Browse files
committed
improve: add error log output if LaneSection belongs to wrong Road
1 parent 6524f7a commit 7ccdcf3

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Road.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ LaneSection Road::get_lanesection(const double s) const
9595

9696
double Road::get_lanesection_end(const LaneSection& lanesection) const
9797
{
98+
if (lanesection.road_id != this->id)
99+
log::error("LaneSection %f in Road #%s, not in Road #%s", lanesection.s0, lanesection.road_id.c_str(), this->id.c_str());
98100
return this->get_lanesection_end(lanesection.s0);
99101
}
100102

0 commit comments

Comments
 (0)