aboutsummaryrefslogtreecommitdiff
path: root/scene/resources/world.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-11-25 00:07:54 -0300
committerJuan Linietsky2017-11-25 00:09:40 -0300
commitbc2e8d99e5ae0dbd69e712cc71da3033f5f30139 (patch)
treed836011e3d5873e3ceea328ea3100f3c7719ab99 /scene/resources/world.cpp
parent7dfba3cda9f13427f9f10a6eefbec52aef62274c (diff)
downloadgodot-bc2e8d9.tar.gz
godot-bc2e8d9.tar.zst
godot-bc2e8d9.zip
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/resources/world.cpp')
-rw-r--r--scene/resources/world.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/resources/world.cpp b/scene/resources/world.cpp
index 86b32a5cd..c63ba24cb 100644
--- a/scene/resources/world.cpp
+++ b/scene/resources/world.cpp
@@ -159,9 +159,9 @@ struct SpatialIndexer {
Vector<Plane> planes = c->get_frustum();
- int culled = octree.cull_convex(planes, cull.ptr(), cull.size());
+ int culled = octree.cull_convex(planes, cull.ptrw(), cull.size());
- VisibilityNotifier **ptr = cull.ptr();
+ VisibilityNotifier **ptr = cull.ptrw();
List<VisibilityNotifier *> added;
List<VisibilityNotifier *> removed;