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
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue