1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20: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:
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

@@ -376,7 +376,7 @@ float CreateDialog::_score_type(const String &p_type, const String &p_search) co
score *= _is_type_preferred(p_type) ? 1.0f : 0.9f;
// Add score for being a favorite type.
score *= (favorite_list.find(p_type) > -1) ? 1.0f : 0.8f;
score *= favorite_list.has(p_type) ? 1.0f : 0.8f;
// Look through at most 5 recent items
bool in_recent = false;