Merge pull request #107469 from Ivorforce/vector-localvector-explicit-span-conversions
Remove implicit conversions between `LocalVector` and `Vector`
This commit is contained in:
@ -6422,7 +6422,7 @@ void TileData::set_collision_polygon_points(int p_layer_id, int p_polygon_index,
|
||||
Vector<Vector2> TileData::get_collision_polygon_points(int p_layer_id, int p_polygon_index) const {
|
||||
ERR_FAIL_INDEX_V(p_layer_id, physics.size(), Vector<Vector2>());
|
||||
ERR_FAIL_INDEX_V(p_polygon_index, physics[p_layer_id].polygons.size(), Vector<Vector2>());
|
||||
return physics[p_layer_id].polygons[p_polygon_index].polygon;
|
||||
return Vector<Vector2>(physics[p_layer_id].polygons[p_polygon_index].polygon);
|
||||
}
|
||||
|
||||
void TileData::set_collision_polygon_one_way(int p_layer_id, int p_polygon_index, bool p_one_way) {
|
||||
|
||||
@ -65,7 +65,7 @@ Ref<ArrayMesh> ConvexPolygonShape3D::get_debug_arraymesh_faces(const Color &p_mo
|
||||
Geometry3D::MeshData md;
|
||||
Error err = ConvexHullComputer::convex_hull(hull_points, md);
|
||||
if (err == OK) {
|
||||
verts = md.vertices;
|
||||
verts = Vector<Vector3>(md.vertices);
|
||||
for (int i = 0; i < verts.size(); i++) {
|
||||
colors.push_back(p_modulate);
|
||||
}
|
||||
|
||||
@ -898,7 +898,7 @@ Ref<ConvexPolygonShape3D> ImporterMesh::create_convex_shape(bool p_clean, bool p
|
||||
Geometry3D::MeshData md;
|
||||
Error err = ConvexHullComputer::convex_hull(vertices, md);
|
||||
if (err == OK) {
|
||||
shape->set_points(md.vertices);
|
||||
shape->set_points(Vector<Vector3>(md.vertices));
|
||||
return shape;
|
||||
} else {
|
||||
ERR_PRINT("Convex shape cleaning failed, falling back to simpler process.");
|
||||
|
||||
@ -525,7 +525,7 @@ void AudioStreamWAV::set_data(const Vector<uint8_t> &p_data) {
|
||||
}
|
||||
|
||||
Vector<uint8_t> AudioStreamWAV::get_data() const {
|
||||
return data;
|
||||
return Vector<uint8_t>(data);
|
||||
}
|
||||
|
||||
Error AudioStreamWAV::save_to_wav(const String &p_path) {
|
||||
|
||||
@ -564,7 +564,7 @@ Ref<ConvexPolygonShape3D> Mesh::create_convex_shape(bool p_clean, bool p_simplif
|
||||
Geometry3D::MeshData md;
|
||||
Error err = ConvexHullComputer::convex_hull(vertices, md);
|
||||
if (err == OK) {
|
||||
shape->set_points(md.vertices);
|
||||
shape->set_points(Vector<Vector3>(md.vertices));
|
||||
return shape;
|
||||
} else {
|
||||
ERR_PRINT("Convex shape cleaning failed, falling back to simpler process.");
|
||||
|
||||
Reference in New Issue
Block a user