From fc27636999a15f88b1f3b1d7101d84a67968ba06 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Wed, 2 Feb 2022 00:04:13 +0545 Subject: Vectors: Use clear() and has(). Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1". --- scene/2d/line_2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scene/2d/line_2d.cpp') diff --git a/scene/2d/line_2d.cpp b/scene/2d/line_2d.cpp index 1a6aaecaa8..7f2290bdc7 100644 --- a/scene/2d/line_2d.cpp +++ b/scene/2d/line_2d.cpp @@ -133,7 +133,7 @@ int Line2D::get_point_count() const { void Line2D::clear_points() { int count = _points.size(); if (count > 0) { - _points.resize(0); + _points.clear(); update(); } } -- cgit v1.2.3