From a0dbdcc3abbd3e6307c6e68d0e60f8c0fa31d576 Mon Sep 17 00:00:00 2001 From: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> Date: Mon, 6 May 2024 16:20:20 +0200 Subject: 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 --- platform/android/os_android.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'platform/android/os_android.cpp') diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp index c60125c34e..764959eef3 100644 --- a/platform/android/os_android.cpp +++ b/platform/android/os_android.cpp @@ -586,11 +586,11 @@ Vector OS_Android::get_system_font_path_for_text(const String &p_font_na } if (score > best_score) { best_score = score; - if (ret.find(root.path_join(E->get().filename)) < 0) { + if (!ret.has(root.path_join(E->get().filename))) { ret.insert(0, root.path_join(E->get().filename)); } } else if (score == best_score || E->get().script.is_empty()) { - if (ret.find(root.path_join(E->get().filename)) < 0) { + if (!ret.has(root.path_join(E->get().filename))) { ret.push_back(root.path_join(E->get().filename)); } } -- cgit v1.2.3