Merge pull request #91619 from AThousandShips/find_improve

Replace `find` with `contains/has` where applicable
This commit is contained in:
Rémi Verschelde 2024-05-08 14:35:44 +02:00
commit a9a1d0a162
No known key found for this signature in database
GPG key ID: C3336907360768E1
55 changed files with 219 additions and 219 deletions

View file

@ -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);