diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:07:54 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-11-25 00:09:40 -0300 |
commit | bc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch) | |
tree | d836011e3d5873e3ceea328ea3100f3c7719ab99 /scene/2d/navigation2d.cpp | |
parent | 7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff) | |
download | redot-engine-bc2e8d99e5ae0dbd69e712cc71da3033f5f30139.tar.gz |
Made Vector::ptrw explicit for writing, compiler was sometimes using the wrong function,
leading to unnecesary copy on writes and reduced performance.
Diffstat (limited to 'scene/2d/navigation2d.cpp')
-rw-r--r-- | scene/2d/navigation2d.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/2d/navigation2d.cpp b/scene/2d/navigation2d.cpp index 74d835dfb2..9eff107827 100644 --- a/scene/2d/navigation2d.cpp +++ b/scene/2d/navigation2d.cpp @@ -150,7 +150,7 @@ void Navigation2D::_navpoly_unlink(int p_id) { Polygon &p = E->get(); int ec = p.edges.size(); - Polygon::Edge *edges = p.edges.ptr(); + Polygon::Edge *edges = p.edges.ptrw(); for (int i = 0; i < ec; i++) { int next = (i + 1) % ec; |