You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
Merge pull request #29941 from qarmin/redundant_code_and_others
Remove redundant code, possible NULL pointers and others
This commit is contained in:
@@ -107,7 +107,7 @@ bool EditorSettings::_set_only(const StringName &p_name, const Variant &p_value)
|
||||
}
|
||||
|
||||
if (save_changed_setting) {
|
||||
if (props[p_name].save != true) {
|
||||
if (!props[p_name].save) {
|
||||
props[p_name].save = true;
|
||||
changed = true;
|
||||
}
|
||||
@@ -692,7 +692,7 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
|
||||
keys.sort();
|
||||
|
||||
for (const List<String>::Element *E = keys.front(); E; E = E->next()) {
|
||||
String key = E->get();
|
||||
const String &key = E->get();
|
||||
if (key.begins_with("text_editor/highlighting/") && key.find("color") >= 0) {
|
||||
cf->set_value(theme_section, key.replace("text_editor/highlighting/", ""), ((Color)props[key].variant).to_html());
|
||||
}
|
||||
@@ -700,10 +700,7 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
|
||||
|
||||
Error err = cf->save(p_file);
|
||||
|
||||
if (err == OK) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
return err == OK;
|
||||
}
|
||||
|
||||
bool EditorSettings::_is_default_text_editor_theme(String p_theme_name) {
|
||||
|
||||
Reference in New Issue
Block a user