diff options
Diffstat (limited to 'scene/resources/curve.cpp')
-rw-r--r-- | scene/resources/curve.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scene/resources/curve.cpp b/scene/resources/curve.cpp index d2cd76b796..6485c1ac77 100644 --- a/scene/resources/curve.cpp +++ b/scene/resources/curve.cpp @@ -661,8 +661,8 @@ void Curve2D::_bake() const { baked_cache_dirty = false; if (points.size() == 0) { - baked_point_cache.resize(0); - baked_dist_cache.resize(0); + baked_point_cache.clear(); + baked_dist_cache.clear(); return; } @@ -1164,10 +1164,10 @@ void Curve3D::_bake() const { baked_cache_dirty = false; if (points.size() == 0) { - baked_point_cache.resize(0); - baked_tilt_cache.resize(0); - baked_up_vector_cache.resize(0); - baked_dist_cache.resize(0); + baked_point_cache.clear(); + baked_tilt_cache.clear(); + baked_up_vector_cache.clear(); + baked_dist_cache.clear(); return; } @@ -1183,7 +1183,7 @@ void Curve3D::_bake() const { baked_up_vector_cache.resize(1); baked_up_vector_cache.set(0, Vector3(0, 1, 0)); } else { - baked_up_vector_cache.resize(0); + baked_up_vector_cache.clear(); } return; |