mirror of
https://github.com/godotengine/godot.git
synced 2025-10-26 11:14:17 +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:
parent
ea12094f19
commit
fc27636999
36 changed files with 62 additions and 64 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue