From 49403cbfa0399bb4284ea5c36cc90216a0bda6ff Mon Sep 17 00:00:00 2001 From: Nathan Franke Date: Thu, 9 Dec 2021 03:42:46 -0600 Subject: Replace String comparisons with "", String() to is_empty() Also: - Adds two stress tests to test_string.h - Changes to .empty() on std::strings --- editor/editor_dir_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'editor/editor_dir_dialog.cpp') diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp index f91dedf25d..61b655098f 100644 --- a/editor/editor_dir_dialog.cpp +++ b/editor/editor_dir_dialog.cpp @@ -49,7 +49,7 @@ void EditorDirDialog::_update_dir(TreeItem *p_item, EditorFileSystemDirectory *p if (!p_item->get_parent()) { p_item->set_text(0, "res://"); } else { - if (!opened_paths.has(path) && (p_select_path == String() || !p_select_path.begins_with(path))) { + if (!opened_paths.has(path) && (p_select_path.is_empty() || !p_select_path.begins_with(path))) { p_item->set_collapsed(true); } -- cgit v1.2.3