MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / reset_ephemeral_settings

Method reset_ephemeral_settings

utility/gdre_config.cpp:510–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

508}
509
510void GDREConfig::reset_ephemeral_settings() {
511 ephemeral_settings.clear();
512 for (const auto &setting : default_settings) {
513 if (setting->is_ephemeral()) {
514 Variant default_value = setting->get_default_value();
515 settings.if_contains(setting->get_full_name(), [&](const auto &v) { default_value = v.second; });
516 ephemeral_settings.try_emplace_l(setting->get_full_name(), [=](auto &v) { v.second = default_value; }, default_value);
517 }
518 }
519}
520
521GDREConfigSetting::GDREConfigSetting(const String &p_full_name, const String &p_brief, const String &p_description, const Variant &p_default_value, bool p_hidden, bool p_ephemeral) {
522 full_name = ::get_full_name(p_full_name);

Callers 1

unload_projectMethod · 0.80

Calls 6

is_ephemeralMethod · 0.80
get_default_valueMethod · 0.80
if_containsMethod · 0.80
get_full_nameMethod · 0.80
try_emplace_lMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected