diff options
author | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
---|---|---|
committer | qarmin <mikrutrafal54@gmail.com> | 2019-06-26 15:08:25 +0200 |
commit | 4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch) | |
tree | 894c5070a709198ed994db7c7d0c0e124abbc9e5 /editor/editor_autoload_settings.cpp | |
parent | 5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff) | |
download | redot-engine-4e5310cc60dc17e5ef09e57115ca8236544679e4.tar.gz |
Some code changed with Clang-Tidy
Diffstat (limited to 'editor/editor_autoload_settings.cpp')
-rw-r--r-- | editor/editor_autoload_settings.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 913eb35f8a..0be7db3236 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -545,10 +545,7 @@ bool EditorAutoloadSettings::can_drop_data_fw(const Point2 &p_point, const Varia int section = tree->get_drop_section_at_position(p_point); - if (section < -1) - return false; - - return true; + return section >= -1; } return false; @@ -650,7 +647,7 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_ return false; } - String path = p_path; + const String &path = p_path; if (!FileAccess::exists(path)) { EditorNode::get_singleton()->show_warning(TTR("Invalid path.") + "\n" + TTR("File does not exist.")); return false; @@ -663,7 +660,7 @@ bool EditorAutoloadSettings::autoload_add(const String &p_name, const String &p_ name = "autoload/" + name; - UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); + UndoRedo *undo_redo = EditorNode::get_undo_redo(); undo_redo->create_action(TTR("Add AutoLoad")); // Singleton autoloads are represented with a leading "*" in their path. @@ -690,7 +687,7 @@ void EditorAutoloadSettings::autoload_remove(const String &p_name) { String name = "autoload/" + p_name; - UndoRedo *undo_redo = EditorNode::get_singleton()->get_undo_redo(); + UndoRedo *undo_redo = EditorNode::get_undo_redo(); int order = ProjectSettings::get_singleton()->get_order(name); |