summaryrefslogtreecommitdiffstats
path: root/editor/scene_tree_dock.cpp
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-01-19 13:21:39 +0100
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-02-09 12:50:15 +0100
commit684752e75bdeb58727c2d9b0ff0265d7fcd47de0 (patch)
tree4fc57e9d0738021b8b31699a6339275347e38ec0 /editor/scene_tree_dock.cpp
parent94dbf69f5d6b7d2fd9561692df2e71557607fddc (diff)
downloadredot-engine-684752e75bdeb58727c2d9b0ff0265d7fcd47de0.tar.gz
Replace error checks against `size` with `is_empty`
Diffstat (limited to 'editor/scene_tree_dock.cpp')
-rw-r--r--editor/scene_tree_dock.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 5b789c9445..d7738e0ba5 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -2660,7 +2660,7 @@ void SceneTreeDock::_create() {
} else if (current_option == TOOL_REPLACE) {
List<Node *> selection = editor_selection->get_selected_node_list();
- ERR_FAIL_COND(selection.size() <= 0);
+ ERR_FAIL_COND(selection.is_empty());
EditorUndoRedoManager *ur = EditorUndoRedoManager::get_singleton();
ur->create_action(TTR("Change type of node(s)"), UndoRedo::MERGE_DISABLE, selection.front()->get());
@@ -2679,7 +2679,7 @@ void SceneTreeDock::_create() {
ur->commit_action(false);
} else if (current_option == TOOL_REPARENT_TO_NEW_NODE) {
List<Node *> selection = editor_selection->get_selected_node_list();
- ERR_FAIL_COND(selection.size() <= 0);
+ ERR_FAIL_COND(selection.is_empty());
// Find top level node in selection
bool only_one_top_node = true;