Skip to content

Commit

Permalink
Merge pull request #51 from victorjarlow/fix_isnan_template
Browse files Browse the repository at this point in the history
Bug fix where isnan <double> template specifier causes compilation errors
  • Loading branch information
pageldev authored Dec 1, 2022
2 parents c0616df + e393014 commit e676a8d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/RefLine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ double RefLine::get_geometry_s0(const double s) const
const RoadGeometry* RefLine::get_geometry(const double s) const
{
const double geom_s0 = this->get_geometry_s0(s);
if (std::isnan<double>(geom_s0))
if (std::isnan(geom_s0))
return nullptr;
return this->s0_to_geometry.at(geom_s0).get();
}
Expand Down
2 changes: 1 addition & 1 deletion src/Road.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Vec3D Road::get_surface_pt(double s, const double t, Vec3D* vn) const
CHECK_AND_REPAIR(s <= this->length, "s > Road::length", s = this->length);

const double lanesection_s0 = this->get_lanesection_s0(s);
if (std::isnan<double>(lanesection_s0))
if (std::isnan(lanesection_s0))
{
throw std::runtime_error(string_format("cannot get road surface pt, no lane section for s %.3f, road length: %.3f", s, this->length));
}
Expand Down

0 comments on commit e676a8d

Please sign in to comment.