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". --- core/math/convex_hull.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/math') diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index 912ffb8b16..bd292f4c2a 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -2129,7 +2129,7 @@ bool ConvexHullInternal::shift_face(Face *p_face, real_t p_amount, LocalVectororigin = shifted_origin; return true; @@ -2167,9 +2167,9 @@ real_t ConvexHullComputer::compute(const Vector3 *p_coords, int32_t p_count, rea return shift; } - vertices.resize(0); - edges.resize(0); - faces.resize(0); + vertices.clear(); + edges.clear(); + faces.clear(); LocalVector old_vertices; get_vertex_copy(hull.vertex_list, old_vertices); -- cgit v1.2.3