diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-21 18:46:27 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-06-26 20:28:34 +0200 |
commit | 98e653dacc98d308e440503c9cf9bba01933d1b4 (patch) | |
tree | e90907756d28cfc68d9200d094e790984ca0606a /src/table/settings/gameopt_settings.ini | |
parent | f35e6c1c7fdaefc9153a54c089dbaa6e2549e6b1 (diff) | |
download | openttd-98e653dacc98d308e440503c9cf9bba01933d1b4.tar.xz |
Fix #9386: compilers failing to compile with LTO by using variants instead of new + unique_ptr
With std::variant all memory can be figured out at compile time, so the compiler needs to keep track of fewer elements. It also saves out a unique_ptr and its memory management, over a slight impact for resolving a setting.
Diffstat (limited to 'src/table/settings/gameopt_settings.ini')
-rw-r--r-- | src/table/settings/gameopt_settings.ini | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/table/settings/gameopt_settings.ini b/src/table/settings/gameopt_settings.ini index ce28def63..447400623 100644 --- a/src/table/settings/gameopt_settings.ini +++ b/src/table/settings/gameopt_settings.ini @@ -33,7 +33,7 @@ static std::initializer_list<const char*> _osk_activation{"disabled", "double", static std::initializer_list<const char*> _settings_profiles{"easy", "medium", "hard"}; static std::initializer_list<const char*> _news_display{ "off", "summarized", "full"}; -static const SettingTable _gameopt_settings{ +static const SettingVariant _gameopt_settings[] = { /* In version 4 a new difficulty setting has been added to the difficulty settings, * town attitude towards demolishing. Needs special handling because some dimwit thought * it funny to have the GameDifficulty struct be an array while it is a struct of |