1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +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:
A Thousand Ships
2024-05-06 16:20:20 +02:00
parent 281fe39929
commit a0dbdcc3ab
55 changed files with 219 additions and 219 deletions

View File

@@ -160,7 +160,7 @@ float EditorQuickOpen::_score_search_result(const PackedStringArray &p_search_to
}
// Prioritize matches at the front of the path token.
if (min_match_idx == 0 || p_path.find("/" + s) != -1) {
if (min_match_idx == 0 || p_path.contains("/" + s)) {
token_score += 1.0f;
}