mirror of
https://github.com/godotengine/godot.git
synced 2025-11-02 06:31:13 +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
|
|
@ -642,11 +642,11 @@ void DependencyRemoveDialog::ok_pressed() {
|
|||
|
||||
for (int i = 0; i < previous_favorites.size(); ++i) {
|
||||
if (previous_favorites[i].ends_with("/")) {
|
||||
if (dirs_to_delete.find(previous_favorites[i]) < 0) {
|
||||
if (!dirs_to_delete.has(previous_favorites[i])) {
|
||||
new_favorites.push_back(previous_favorites[i]);
|
||||
}
|
||||
} else {
|
||||
if (files_to_delete.find(previous_favorites[i]) < 0) {
|
||||
if (!files_to_delete.has(previous_favorites[i])) {
|
||||
new_favorites.push_back(previous_favorites[i]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue