diff options
author | Anilforextra <anilforextra@gmail.com> | 2022-02-02 00:04:13 +0545 |
---|---|---|
committer | Anilforextra <anilforextra@gmail.com> | 2022-02-02 00:11:09 +0545 |
commit | fc27636999a15f88b1f3b1d7101d84a67968ba06 (patch) | |
tree | e3b66fce3dfd70ef1e7d5a4d1543446af2deae47 /scene/2d/line_2d.cpp | |
parent | ea12094f19b028c1dcf6d402b8cbb3296b2065a8 (diff) |
Vectors: Use clear() and has().
Use clear() instead of resize(0).
Use has() instead of "find(p_val) != -1".
Diffstat (limited to 'scene/2d/line_2d.cpp')
-rw-r--r-- | scene/2d/line_2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); } } |