FIXME configuration: Avoid unnecessary allocations

ConfigurationShared::Widget needs to be created with a builder. This
would avoid some duplicated code.
This commit is contained in:
lat9nq
2023-06-10 16:40:38 -04:00
parent c5f8b909ec
commit 79024bb955
5 changed files with 22 additions and 2 deletions

View File

@ -123,6 +123,10 @@ void ConfigureSystem::Setup() {
push(Settings::values.linkage.by_category[Settings::Category::System]);
for (auto setting : settings) {
if (!Settings::IsConfiguringGlobal() && !setting->Switchable()) {
continue;
}
[[maybe_unused]] std::string label = setting->GetLabel();
ConfigurationShared::Widget* widget = [=]() {
if (setting->Id() == Settings::values.custom_rtc.Id()) {