mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
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
|
@ -742,7 +742,7 @@ void ScriptEditor::_add_recent_script(const String &p_path) {
|
|||
}
|
||||
|
||||
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scripts", Array());
|
||||
if (rc.find(p_path) != -1) {
|
||||
if (rc.has(p_path)) {
|
||||
rc.erase(p_path);
|
||||
}
|
||||
rc.push_front(p_path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue