diff options
author | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2019-07-05 18:08:43 +0100 |
---|---|---|
committer | Ibrahn Sahir <ibrahn.sahir@gmail.com> | 2019-07-06 12:04:27 +0100 |
commit | 4e4697b1c481094949165fa9edbe6aeebcfcf3b4 (patch) | |
tree | a05fa9e7249febb9093885ddc21da1cd967be314 /servers | |
parent | 0b6b49a897b35bec53765e1288c32d57afa1a293 (diff) |
Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
Diffstat (limited to 'servers')
-rw-r--r-- | servers/physics/shape_sw.cpp | 4 | ||||
-rw-r--r-- | servers/physics_2d/shape_2d_sw.cpp | 2 | ||||
-rw-r--r-- | servers/visual/visual_server_scene.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics/shape_sw.cpp b/servers/physics/shape_sw.cpp index d40de669fd..8a52f29729 100644 --- a/servers/physics/shape_sw.cpp +++ b/servers/physics/shape_sw.cpp @@ -1524,8 +1524,8 @@ void ConcavePolygonShapeSW::_setup(PoolVector<Vector3> p_faces) { _aabb.merge_with(bvh_arrayw[i].aabb); } - w = PoolVector<Face>::Write(); - vw = PoolVector<Vector3>::Write(); + w.release(); + vw.release(); int count = 0; _VolumeSW_BVH *bvh_tree = _volume_sw_build_bvh(bvh_arrayw, src_face_count, count); diff --git a/servers/physics_2d/shape_2d_sw.cpp b/servers/physics_2d/shape_2d_sw.cpp index 0043b948b0..48799a56fb 100644 --- a/servers/physics_2d/shape_2d_sw.cpp +++ b/servers/physics_2d/shape_2d_sw.cpp @@ -986,7 +986,7 @@ Variant ConcavePolygonShape2DSW::get_data() const { w[(i << 1) + 1] = points[segments[i].points[1]]; } - w = PoolVector<Vector2>::Write(); + w.release(); return rsegments; } diff --git a/servers/visual/visual_server_scene.cpp b/servers/visual/visual_server_scene.cpp index faf5a1f8fa..7c100be0f2 100644 --- a/servers/visual/visual_server_scene.cpp +++ b/servers/visual/visual_server_scene.cpp @@ -2396,7 +2396,7 @@ void VisualServerScene::_setup_gi_probe(Instance *p_instance) { mipmap.resize(size); PoolVector<uint8_t>::Write w = mipmap.write(); zeromem(w.ptr(), size); - w = PoolVector<uint8_t>::Write(); + w.release(); probe->dynamic.mipmaps_3d.push_back(mipmap); |