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.
This commit is contained in:
rubidium42
2021-06-21 18:46:27 +02:00
committed by Patric Stout
parent f35e6c1c7f
commit 98e653dacc
13 changed files with 16 additions and 14 deletions

View File

@@ -20,7 +20,7 @@ extern bool _allow_hidpi_window;
#define WITHOUT_COCOA
#endif
static const SettingTable _misc_settings{
static const SettingVariant _misc_settings[] = {
[post-amble]
};
[templates]