diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-20 00:01:55 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-06-20 00:01:55 +0200 |
commit | e4deaa2727377cc37456e687c68bbf8ead465c93 (patch) | |
tree | f9ca394f1adf7d79056efacc8afce2de7fc6e07f /core/math/convex_hull.cpp | |
parent | bfec390026ada5e2a3c054d5f508d5c69bb0fafc (diff) | |
parent | 1324c7d06afed0e93f950c914a2d83359768006d (diff) | |
download | redot-engine-e4deaa2727377cc37456e687c68bbf8ead465c93.tar.gz |
Merge pull request #76787 from RedworkDE/avoid-localvector-copy
Avoid making unnecessary copies of `LocalVector`
Diffstat (limited to 'core/math/convex_hull.cpp')
-rw-r--r-- | core/math/convex_hull.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/math/convex_hull.cpp b/core/math/convex_hull.cpp index 76b3062944..f8456ec998 100644 --- a/core/math/convex_hull.cpp +++ b/core/math/convex_hull.cpp @@ -658,7 +658,7 @@ private: Vector3 get_gd_normal(Face *p_face); - bool shift_face(Face *p_face, real_t p_amount, LocalVector<Vertex *> p_stack); + bool shift_face(Face *p_face, real_t p_amount, LocalVector<Vertex *> &p_stack); public: ~ConvexHullInternal() { @@ -1775,7 +1775,7 @@ real_t ConvexHullInternal::shrink(real_t p_amount, real_t p_clamp_amount) { return p_amount; } -bool ConvexHullInternal::shift_face(Face *p_face, real_t p_amount, LocalVector<Vertex *> p_stack) { +bool ConvexHullInternal::shift_face(Face *p_face, real_t p_amount, LocalVector<Vertex *> &p_stack) { Vector3 orig_shift = get_gd_normal(p_face) * -p_amount; if (scaling[0] != 0) { orig_shift[0] /= scaling[0]; |