Vectors: Use clear() and has().

Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
This commit is contained in:
Anilforextra 2022-02-02 00:04:13 +05:45
parent ea12094f19
commit fc27636999
36 changed files with 62 additions and 64 deletions

View file

@ -3725,7 +3725,7 @@ void EditorNode::_show_messages() {
void EditorNode::_add_to_recent_scenes(const String &p_scene) {
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scenes", Array());
if (rc.find(p_scene) != -1) {
if (rc.has(p_scene)) {
rc.erase(p_scene);
}
rc.push_front(p_scene);