Skip to content

Commit

Permalink
Addressing review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
bailaC committed Jan 12, 2024
1 parent 983dc47 commit cebd45e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions hardware_interface/src/lexical_casts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ std::optional<double> stod(const std::string & s)
stream >> result;
if (stream.fail() || !stream.eof())
{
throw std::invalid_argument("Failed converting string to real number");
return std::nullopt;
}
return result;
#else
Expand All @@ -40,9 +40,7 @@ std::optional<double> stod(const std::string & s)
{
return result_value;
}

return std::nullopt;
;
#endif
}
} // namespace impl
Expand Down

0 comments on commit cebd45e

Please sign in to comment.