Replace find with contains/has where applicable
* Replaces `find(...) != -1` with `contains` for `String` * Replaces `find(...) == -1` with `!contains` for `String` * Replaces `find(...) != -1` with `has` for containers * Replaces `find(...) == -1` with `!has` for containers
This commit is contained in:
parent
281fe39929
commit
a0dbdcc3ab
55 changed files with 219 additions and 219 deletions
|
|
@ -2391,7 +2391,7 @@ void EditorNode::_edit_current(bool p_skip_foreign, bool p_skip_inspector_update
|
|||
Ref<Resource> res = Object::cast_to<Resource>(current_obj);
|
||||
if (p_skip_foreign && res.is_valid()) {
|
||||
const int current_tab = scene_tabs->get_current_tab();
|
||||
if (res->get_path().find("::") > -1 && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(current_tab)) {
|
||||
if (res->get_path().contains("::") && res->get_path().get_slice("::", 0) != editor_data.get_scene_path(current_tab)) {
|
||||
// Trying to edit resource that belongs to another scene; abort.
|
||||
current_obj = nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue