From 85ff6ef2d2337bf601697887ab5132c2800772d5 Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Fri, 8 Nov 2024 17:27:57 +0900 Subject: [PATCH] fix: misc-throw-by-value-catch-by-reference Signed-off-by: kobayu858 --- eagleye_core/coordinate/src/convertheight.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eagleye_core/coordinate/src/convertheight.cpp b/eagleye_core/coordinate/src/convertheight.cpp index 4de40058..df5825fc 100755 --- a/eagleye_core/coordinate/src/convertheight.cpp +++ b/eagleye_core/coordinate/src/convertheight.cpp @@ -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); @@ -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);