You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +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:
@@ -742,7 +742,7 @@ void ScriptEditor::_add_recent_script(const String &p_path) {
|
||||
}
|
||||
|
||||
Array rc = EditorSettings::get_singleton()->get_project_metadata("recent_files", "scripts", Array());
|
||||
if (rc.find(p_path) != -1) {
|
||||
if (rc.has(p_path)) {
|
||||
rc.erase(p_path);
|
||||
}
|
||||
rc.push_front(p_path);
|
||||
|
||||
Reference in New Issue
Block a user