Browse Source

SettingsManager: Catch exception with constant reference parameter.

This fixes warning: catching polymorphic type 'class std::exception' by value.
merge-requests/254/head
Biswapriyo Nath 1 year ago
committed by Adam Honse
parent
commit
9e9a91a048
  1. 4
      SettingsManager.cpp

4
SettingsManager.cpp

@ -75,7 +75,7 @@ void SettingsManager::LoadSettings(std::string filename)
{
settings_file >> settings_data;
}
catch(std::exception e)
catch(const std::exception& e)
{
/*-------------------------------------------------*\
| If an exception was caught, that means the JSON |
@ -99,7 +99,7 @@ void SettingsManager::SaveSettings()
{
settings_file << settings_data.dump(4);
}
catch(std::exception e)
catch(const std::exception& e)
{
}

Loading…
Cancel
Save