SettingsManager: Catch exception with constant reference parameter.

This fixes warning: catching polymorphic type 'class std::exception' by value.
This commit is contained in:
Biswapriyo Nath 2020-12-08 14:04:11 +05:30 committed by Adam Honse
parent e1faa783b6
commit 9e9a91a048

View file

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