Skip to content

Commit

Permalink
fix: misc-throw-by-value-catch-by-reference
Browse files Browse the repository at this point in the history
Signed-off-by: kobayu858 <[email protected]>
  • Loading branch information
kobayu858 committed Nov 8, 2024
1 parent f8f275b commit 85ff6ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions eagleye_core/coordinate/src/convertheight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ double ConvertHeight::convert2altitude()
GeographicLib::Geoid egm2008("egm2008-1");
converted_height = egm2008.ConvertHeight(_latitude, _longitude, _height, GeographicLib::Geoid::ELLIPSOIDTOGEOID);
}
catch (const GeographicLib::GeographicErr err)
catch (const GeographicLib::GeographicErr& err)
{
std::cerr << "\033[31;1mError: Failed to convert height from Ellipsoid to Altitude. " << err.what() << std::endl;
exit(4);
Expand All @@ -64,7 +64,7 @@ double ConvertHeight::convert2ellipsoid()
GeographicLib::Geoid egm2008("egm2008-1");
converted_height = egm2008.ConvertHeight(_latitude, _longitude, _height, GeographicLib::Geoid::GEOIDTOELLIPSOID);
}
catch (const GeographicLib::GeographicErr err)
catch (const GeographicLib::GeographicErr& err)
{
std::cerr << "\033[31;1mError: Failed to convert height from Ellipsoid to Altitude. " << err.what() << std::endl;
exit(4);
Expand Down

0 comments on commit 85ff6ef

Please sign in to comment.