diff options
| author | Rémi Verschelde <rverschelde@gmail.com> | 2020-11-09 14:34:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-09 14:34:49 +0100 |
| commit | 01154f1ad20e7c6707ef1229394a4330eb4e31b7 (patch) | |
| tree | 3a3195b3e39238c7c307b8d7e941a72871f60c0c /editor/project_settings_editor.cpp | |
| parent | eda8f69c19ffaa219bdb0afe67dfb7df17a46d1c (diff) | |
| parent | 221a2a17422dfbb7e0be5ca42fe56b91adb656e3 (diff) | |
Merge pull request #43403 from reduz/variant-constructor-refactor
Refactored variant constructor logic
Diffstat (limited to 'editor/project_settings_editor.cpp')
| -rw-r--r-- | editor/project_settings_editor.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp index d231e3f353..55d80021c8 100644 --- a/editor/project_settings_editor.cpp +++ b/editor/project_settings_editor.cpp @@ -98,7 +98,8 @@ void ProjectSettingsEditor::_add_setting() { // Initialize the property with the default value for the given type. // The type list starts at 1 (as we exclude Nil), so add 1 to the selected value. Callable::CallError ce; - const Variant value = Variant::construct(Variant::Type(type->get_selected() + 1), nullptr, 0, ce); + Variant value; + Variant::construct(Variant::Type(type->get_selected() + 1), value, nullptr, 0, ce); undo_redo->create_action(TTR("Add Project Setting")); undo_redo->add_do_property(ps, setting, value); |