MT#64469 catch exception by reference

Fixes:

AmUtils.cpp: In function ‘bool str2int(const std::string&, double&)’:
AmUtils.cpp:286:21: warning: catching polymorphic type ‘const class std::invalid_argument’ by value [-Wcatch-value=]
  286 |   catch (const std::invalid_argument)
      |                     ^~~~~~~~~~~~~~~~
AmUtils.cpp:290:21: warning: catching polymorphic type ‘const class std::out_of_range’ by value [-Wcatch-value=]
  290 |   catch (const std::out_of_range)
      |                     ^~~~~~~~~~~~

Change-Id: I3d112aff65ea6e90803b6be7c138227a36975d9f
pull/8/head
Richard Fuchs 4 months ago
parent 765ef886b9
commit 125da11c6f

@ -280,11 +280,11 @@ bool str2int(const string& str, double& result)
return true;
}
catch (const std::invalid_argument)
catch (const std::invalid_argument&)
{
return false;
}
catch (const std::out_of_range)
catch (const std::out_of_range&)
{
return false;
}

Loading…
Cancel
Save