From 98e653dacc98d308e440503c9cf9bba01933d1b4 Mon Sep 17 00:00:00 2001 From: rubidium42 Date: Mon, 21 Jun 2021 18:46:27 +0200 Subject: 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. --- src/table/settings/settings.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/table/settings/settings.ini') diff --git a/src/table/settings/settings.ini b/src/table/settings/settings.ini index 6fe4d9d51..a0a835364 100644 --- a/src/table/settings/settings.ini +++ b/src/table/settings/settings.ini @@ -49,7 +49,7 @@ static void UpdateClientConfigValues(); * assigns its own value. If the setting was company-based, that would mean that * vehicles could decide on different moments that they are heading back to a * service depot, causing desyncs on a massive scale. */ -const SettingTable _settings{ +static const SettingVariant _settings[] = { [post-amble] }; [templates] -- cgit v1.2.3-54-g00ecf