diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-12-10 08:56:31 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-10 08:56:31 +0100 |
commit | bdf8340e5993ec3f86e4bf1d5ede48df7d023a12 (patch) | |
tree | 1e366583662397e366d4f84bb334660db37cb5bd /editor/editor_path.cpp | |
parent | 5ad9d8bad69309d71ea55f3d799af7e3711dc262 (diff) | |
parent | 49403cbfa0399bb4284ea5c36cc90216a0bda6ff (diff) |
Merge pull request #43181 from nathanfranke/string-empty
Replace String comparisons with "", String() to is_empty()
Diffstat (limited to 'editor/editor_path.cpp')
-rw-r--r-- | editor/editor_path.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp index 45c0232072..b6797825b0 100644 --- a/editor/editor_path.cpp +++ b/editor/editor_path.cpp @@ -130,14 +130,14 @@ void EditorPath::update_path() { name = r->get_name(); } - if (name == "") { + if (name.is_empty()) { name = r->get_class(); } } else if (obj->is_class("EditorDebuggerRemoteObject")) { name = obj->call("get_title"); } else if (Object::cast_to<Node>(obj)) { name = Object::cast_to<Node>(obj)->get_name(); - } else if (Object::cast_to<Resource>(obj) && Object::cast_to<Resource>(obj)->get_name() != "") { + } else if (Object::cast_to<Resource>(obj) && !Object::cast_to<Resource>(obj)->get_name().is_empty()) { name = Object::cast_to<Resource>(obj)->get_name(); } else { name = obj->get_class(); |