diff --git a/core/local_vector.h b/core/local_vector.h index 054386b09d0..dc4e2061686 100644 --- a/core/local_vector.h +++ b/core/local_vector.h @@ -255,7 +255,7 @@ public: return ret; } - operator PoolVector() const { + explicit operator PoolVector() const { PoolVector pl; if (size()) { pl.resize(size()); diff --git a/core/math/vertex_cache_optimizer.cpp b/core/math/vertex_cache_optimizer.cpp index 7b2695fa670..95e265db305 100644 --- a/core/math/vertex_cache_optimizer.cpp +++ b/core/math/vertex_cache_optimizer.cpp @@ -281,7 +281,7 @@ bool VertexCacheOptimizer::reorder_indices_pool(PoolVector &r_indices, uint LocalVector temp; temp = r_indices; if (reorder_indices(temp, p_num_triangles, p_num_verts)) { - r_indices = temp; + r_indices = PoolVector(temp); return true; } return false; diff --git a/scene/resources/merging_tool.cpp b/scene/resources/merging_tool.cpp index 67c45ef97e4..4d448211f9e 100644 --- a/scene/resources/merging_tool.cpp +++ b/scene/resources/merging_tool.cpp @@ -505,7 +505,7 @@ int MergingTool::_clean_mesh_surface(const String &p_source_name, const Transfor return 0; } -bool MergingTool::_ensure_indices_valid(LocalVector &r_indices, const PoolVector &p_verts) { +bool MergingTool::_ensure_indices_valid(LocalVector &r_indices, const LocalVector &p_verts) { // No indices? create some. if (!r_indices.size()) { #ifdef TOOLS_ENABLED @@ -535,7 +535,7 @@ bool MergingTool::_ensure_indices_valid(LocalVector &r_indices, const PoolV } // Check for invalid tris, or make a list of the valid triangles, depending on whether r_inds is set. -bool MergingTool::_check_for_valid_indices(const LocalVector &p_inds, const PoolVector &p_verts, LocalVector *r_inds) { +bool MergingTool::_check_for_valid_indices(const LocalVector &p_inds, const LocalVector &p_verts, LocalVector *r_inds) { int nTris = p_inds.size(); nTris /= 3; int indCount = 0; diff --git a/scene/resources/merging_tool.h b/scene/resources/merging_tool.h index 28fe207c564..fdad2e101c9 100644 --- a/scene/resources/merging_tool.h +++ b/scene/resources/merging_tool.h @@ -109,8 +109,8 @@ private: static bool _is_mergeable_with_common(const MeshInstance &p_mi, const MeshInstance &p_other); static bool _is_shadow_mergeable(const MeshInstance &p_mi); static bool _is_material_opaque(const Ref &p_mat); - static bool _ensure_indices_valid(LocalVector &r_indices, const PoolVector &p_verts); - static bool _check_for_valid_indices(const LocalVector &p_inds, const PoolVector &p_verts, LocalVector *r_inds); + static bool _ensure_indices_valid(LocalVector &r_indices, const LocalVector &p_verts); + static bool _check_for_valid_indices(const LocalVector &p_inds, const LocalVector &p_verts, LocalVector *r_inds); static bool _triangle_is_degenerate(const Vector3 &p_a, const Vector3 &p_b, const Vector3 &p_c, real_t p_epsilon); static int _clean_mesh_surface(const String &p_source_name, const Transform &p_xform, Ref &p_rmesh, int p_surface_id, Ref r_dest_mesh); static void _copy_geometry_instance_settings(const GeometryInstance &p_source, MeshInstance &r_dest, bool p_copy_transform);