You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Vectors: Use clear() and has().
Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1".
This commit is contained in:
@@ -3486,7 +3486,7 @@ void ScriptEditor::_open_script_request(const String &p_path) {
|
||||
void ScriptEditor::register_syntax_highlighter(const Ref<EditorSyntaxHighlighter> &p_syntax_highlighter) {
|
||||
ERR_FAIL_COND(p_syntax_highlighter.is_null());
|
||||
|
||||
if (syntax_highlighters.find(p_syntax_highlighter) == -1) {
|
||||
if (!syntax_highlighters.has(p_syntax_highlighter)) {
|
||||
syntax_highlighters.push_back(p_syntax_highlighter);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user