You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-06 12:20:30 +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:
@@ -1030,7 +1030,7 @@ void VisualShaderEditor::edit(VisualShader *p_visual_shader) {
|
||||
}
|
||||
|
||||
void VisualShaderEditor::add_plugin(const Ref<VisualShaderNodePlugin> &p_plugin) {
|
||||
if (plugins.find(p_plugin) != -1) {
|
||||
if (plugins.has(p_plugin)) {
|
||||
return;
|
||||
}
|
||||
plugins.push_back(p_plugin);
|
||||
|
||||
Reference in New Issue
Block a user