mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-12-17 00:35:12 -06:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user