1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

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)
This commit is contained in:
Ibrahn Sahir
2019-07-05 18:08:43 +01:00
parent 0b6b49a897
commit 4e4697b1c4
41 changed files with 102 additions and 114 deletions

View File

@@ -1491,7 +1491,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
w[i] = current_shape[i] - shape_anchor;
}
w = PoolVector<Vector2>::Write();
w.release();
undo_redo->create_action(TTR("Edit Occlusion Polygon"));
undo_redo->add_do_method(edited_occlusion_shape.ptr(), "set_polygon", polygon);
@@ -1514,7 +1514,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
indices.push_back(i);
}
w = PoolVector<Vector2>::Write();
w.release();
undo_redo->create_action(TTR("Edit Navigation Polygon"));
undo_redo->add_do_method(edited_navigation_shape.ptr(), "set_vertices", polygon);
@@ -2785,7 +2785,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
w[i] = current_shape[i] - shape_anchor;
}
w = PoolVector<Vector2>::Write();
w.release();
shape->set_polygon(polygon);
undo_redo->create_action(TTR("Create Occlusion Polygon"));
@@ -2813,7 +2813,7 @@ void TileSetEditor::close_shape(const Vector2 &shape_anchor) {
indices.push_back(i);
}
w = PoolVector<Vector2>::Write();
w.release();
shape->set_vertices(polygon);
shape->add_polygon(indices);