diff --git a/core/local_vector.h b/core/local_vector.h index 054386b09d0..578d5f22f9c 100644 --- a/core/local_vector.h +++ b/core/local_vector.h @@ -247,7 +247,7 @@ public: insert(i, p_val); } - operator Vector() const { + explicit operator Vector() const { Vector ret; ret.resize(size()); T *w = ret.ptrw(); diff --git a/modules/fbx/data/fbx_mesh_data.cpp b/modules/fbx/data/fbx_mesh_data.cpp index 02897a493fd..a41cc963905 100644 --- a/modules/fbx/data/fbx_mesh_data.cpp +++ b/modules/fbx/data/fbx_mesh_data.cpp @@ -309,7 +309,7 @@ MeshInstance *FBXMeshData::create_fbx_mesh(const ImportState &state, const FBXDo triangulate_polygon( surface->surface_tool, *indices, - surface->vertices_map, + Vector(surface->vertices_map), vertices); } } diff --git a/modules/lightmapper_cpu/lightmapper_cpu.cpp b/modules/lightmapper_cpu/lightmapper_cpu.cpp index f9d066dd649..488964b7f16 100644 --- a/modules/lightmapper_cpu/lightmapper_cpu.cpp +++ b/modules/lightmapper_cpu/lightmapper_cpu.cpp @@ -1536,9 +1536,9 @@ LightmapperCPU::BakeError LightmapperCPU::bake(BakeQuality p_quality, bool p_use } if (p_generate_atlas) { - _blit_lightmap(lightmaps_data[i], mesh_instances[i].size, bake_textures[mesh_instances[i].slice], mesh_instances[i].offset.x, mesh_instances[i].offset.y, true); + _blit_lightmap(Vector(lightmaps_data[i]), mesh_instances[i].size, bake_textures[mesh_instances[i].slice], mesh_instances[i].offset.x, mesh_instances[i].offset.y, true); } else { - _blit_lightmap(lightmaps_data[i], mesh_instances[i].size, bake_textures[i], 0, 0, false); + _blit_lightmap(Vector(lightmaps_data[i]), mesh_instances[i].size, bake_textures[i], 0, 0, false); } } } diff --git a/scene/3d/room_manager.cpp b/scene/3d/room_manager.cpp index a1adc25ae98..a55e36fdbb8 100644 --- a/scene/3d/room_manager.cpp +++ b/scene/3d/room_manager.cpp @@ -1470,7 +1470,7 @@ bool RoomManager::_convert_room_hull_preliminary(Room *p_room, const Vector pts; + Vector pts; Vector3 mins = aabb.position; Vector3 maxs = mins + aabb.size; @@ -1596,7 +1596,7 @@ bool RoomManager::_convert_room_hull_final(Room *p_room, const LocalVector_bound_mesh_data = md_simplified; // send bound to visual server - VisualServer::get_singleton()->room_set_bound(p_room->_room_rid, p_room->get_instance_id(), p_room->_planes, p_room->_aabb, md_simplified.vertices); + VisualServer::get_singleton()->room_set_bound(p_room->_room_rid, p_room->get_instance_id(), Vector(p_room->_planes), p_room->_aabb, md_simplified.vertices); return true; } diff --git a/scene/resources/merging_tool.cpp b/scene/resources/merging_tool.cpp index 67c45ef97e4..7b68fd14edd 100644 --- a/scene/resources/merging_tool.cpp +++ b/scene/resources/merging_tool.cpp @@ -845,7 +845,7 @@ bool MergingTool::join_mesh_surface(const MeshInstance &p_source_mi, uint32_t p_ } // No compat checking, no renaming. -bool MergingTool::join_meshes(MeshInstance &r_dest_mi, Vector p_list) { +bool MergingTool::join_meshes(MeshInstance &r_dest_mi, LocalVector p_list) { if (p_list.size() < 1) { // Should not happen but just in case... return false; diff --git a/scene/resources/merging_tool.h b/scene/resources/merging_tool.h index 28fe207c564..d8486ad6c10 100644 --- a/scene/resources/merging_tool.h +++ b/scene/resources/merging_tool.h @@ -67,7 +67,7 @@ public: static bool merge_meshes(MeshInstance &r_dest_mi, Vector p_list, bool p_use_global_space, bool p_check_compatibility); // Join all surfaces into one ubermesh. - static bool join_meshes(MeshInstance &r_dest_mi, Vector p_list); + static bool join_meshes(MeshInstance &r_dest_mi, LocalVector p_list); // Adds a surface from one mesh to another. static bool join_mesh_surface(const MeshInstance &p_source_mi, uint32_t p_source_surface_id, MeshInstance &r_dest_mi); diff --git a/servers/visual/portals/portal_renderer.h b/servers/visual/portals/portal_renderer.h index 89c2b529c58..7048f63f67a 100644 --- a/servers/visual/portals/portal_renderer.h +++ b/servers/visual/portals/portal_renderer.h @@ -349,7 +349,7 @@ private: bool _override_camera = false; Vector3 _override_camera_pos; - LocalVector _override_camera_planes; + Vector _override_camera_planes; public: static String _rid_to_string(RID p_rid); diff --git a/servers/visual/portals/portal_types.cpp b/servers/visual/portals/portal_types.cpp index f4bbb3561a4..ad6cc20524f 100644 --- a/servers/visual/portals/portal_types.cpp +++ b/servers/visual/portals/portal_types.cpp @@ -136,7 +136,7 @@ bool VSPortal::_is_plane_duplicate(const Plane &p_plane, const LocalVector &p_planes) const { // short version - const Vector &pts = _pts_world; + const LocalVector &pts = _pts_world; int nPoints = pts.size(); const real_t epsilon = 0.1; @@ -180,7 +180,7 @@ bool VSPortal::_test_pvs_plane(const Plane &p_plane, const Vector3 *pts_a, int n // add clipping planes to the vector formed by each portal edge and the camera void VSPortal::add_planes(const Vector3 &p_cam, LocalVector &r_planes, bool p_outgoing) const { // short version - const Vector &pts = _pts_world; + const LocalVector &pts = _pts_world; int nPoints = pts.size(); ERR_FAIL_COND(nPoints < 3);