diff --git a/source/blender/animrig/ANIM_keyframing.hh b/source/blender/animrig/ANIM_keyframing.hh index f55d93cf360..6081c70e60b 100644 --- a/source/blender/animrig/ANIM_keyframing.hh +++ b/source/blender/animrig/ANIM_keyframing.hh @@ -193,7 +193,7 @@ int insert_key_action(Main *bmain, PointerRNA *ptr, const std::string &rna_path, float frame, - const Span values, + Span values, eInsertKeyFlags insert_key_flag, eBezTriple_KeyframeType key_type); diff --git a/source/blender/blenkernel/BKE_attribute.hh b/source/blender/blenkernel/BKE_attribute.hh index 930153caf6d..e86f749e319 100644 --- a/source/blender/blenkernel/BKE_attribute.hh +++ b/source/blender/blenkernel/BKE_attribute.hh @@ -874,7 +874,7 @@ void gather_attributes(AttributeAccessor src_attributes, eAttrDomain domain, const AnonymousAttributePropagationInfo &propagation_info, const Set &skip, - const Span indices, + Span indices, MutableAttributeAccessor dst_attributes); /** diff --git a/source/blender/blenkernel/BKE_geometry_set.hh b/source/blender/blenkernel/BKE_geometry_set.hh index 0eb573777da..814fd302a71 100644 --- a/source/blender/blenkernel/BKE_geometry_set.hh +++ b/source/blender/blenkernel/BKE_geometry_set.hh @@ -186,12 +186,12 @@ struct GeometrySet { /** * Remove all geometry components with types that are not in the provided list. */ - void keep_only(const Span component_types); + void keep_only(Span component_types); /** * Keeps the provided geometry types, but also instances and edit data. * Instances must not be removed while using #modify_geometry_sets. */ - void keep_only_during_modify(const Span component_types); + void keep_only_during_modify(Span component_types); void remove_geometry_during_modify(); void add(const GeometryComponent &component); diff --git a/source/blender/blenkernel/BKE_volume_to_mesh.hh b/source/blender/blenkernel/BKE_volume_to_mesh.hh index 5cdf3a44212..c730da46487 100644 --- a/source/blender/blenkernel/BKE_volume_to_mesh.hh +++ b/source/blender/blenkernel/BKE_volume_to_mesh.hh @@ -58,9 +58,9 @@ struct OpenVDBMeshData volume_to_mesh_data(const openvdb::GridBase &grid, * This can be used to add mesh data from a grid into an existing mesh rather than merging multiple * meshes later on. */ -void fill_mesh_from_openvdb_data(const Span vdb_verts, - const Span vdb_tris, - const Span vdb_quads, +void fill_mesh_from_openvdb_data(Span vdb_verts, + Span vdb_tris, + Span vdb_quads, int vert_offset, int face_offset, int loop_offset, diff --git a/source/blender/blenkernel/intern/pbvh_uv_islands.hh b/source/blender/blenkernel/intern/pbvh_uv_islands.hh index 998664c7997..1b221644b7b 100644 --- a/source/blender/blenkernel/intern/pbvh_uv_islands.hh +++ b/source/blender/blenkernel/intern/pbvh_uv_islands.hh @@ -118,10 +118,10 @@ class TriangleToEdgeMap { */ struct MeshData { public: - const Span looptris; - const Span corner_verts; - const Span uv_map; - const Span vert_positions; + Span looptris; + Span corner_verts; + Span uv_map; + Span vert_positions; VertToEdgeMap vert_to_edge_map; @@ -141,8 +141,8 @@ struct MeshData { public: explicit MeshData(Span looptris, Span corner_verts, - const Span uv_map, - const Span vert_positions); + Span uv_map, + Span vert_positions); }; struct UVVertex { diff --git a/source/blender/editors/sculpt_paint/paint_intern.hh b/source/blender/editors/sculpt_paint/paint_intern.hh index 366b1a50241..eb9280cc408 100644 --- a/source/blender/editors/sculpt_paint/paint_intern.hh +++ b/source/blender/editors/sculpt_paint/paint_intern.hh @@ -456,7 +456,7 @@ enum BrushStrokeMode { namespace blender::ed::sculpt_paint::hide { void sync_all_from_faces(Object &object); -void mesh_show_all(Object &object, const Span nodes); +void mesh_show_all(Object &object, Span nodes); void grids_show_all(Depsgraph &depsgraph, Object &object, Span nodes); void tag_update_visibility(const bContext &C); diff --git a/source/blender/editors/space_text/text_format.hh b/source/blender/editors/space_text/text_format.hh index 9dd2357c585..27a25861295 100644 --- a/source/blender/editors/space_text/text_format.hh +++ b/source/blender/editors/space_text/text_format.hh @@ -126,14 +126,13 @@ void ED_text_format_register_pov_ini(); * If a string literal is found, the length of the string literal is returned. * Otherwise, 0. */ -int text_format_string_literal_find(const Span string_literals, const char *text); +int text_format_string_literal_find(Span string_literals, const char *text); #ifndef NDEBUG /** * Check if #string_literals array is shorted. This validation is required since text formatters do * binary search on these string literals arrays. Used only for assertions. */ -const bool text_format_string_literals_check_sorted_array( - const Span &string_literals); +const bool text_format_string_literals_check_sorted_array(Span &string_literals); #endif diff --git a/source/blender/functions/FN_lazy_function_execute.hh b/source/blender/functions/FN_lazy_function_execute.hh index 267a5da5825..d5a0806d4bf 100644 --- a/source/blender/functions/FN_lazy_function_execute.hh +++ b/source/blender/functions/FN_lazy_function_execute.hh @@ -30,8 +30,8 @@ class BasicParams : public Params { public: BasicParams(const LazyFunction &fn, - const Span inputs, - const Span outputs, + Span inputs, + Span outputs, MutableSpan> input_usages, Span output_usages, MutableSpan set_outputs); diff --git a/source/blender/geometry/GEO_add_curves_on_mesh.hh b/source/blender/geometry/GEO_add_curves_on_mesh.hh index c1523e0452b..f9fc321c5d9 100644 --- a/source/blender/geometry/GEO_add_curves_on_mesh.hh +++ b/source/blender/geometry/GEO_add_curves_on_mesh.hh @@ -62,6 +62,6 @@ AddCurvesOnMeshOutputs add_curves_on_mesh(bke::CurvesGeometry &curves, float3 compute_surface_point_normal(const MLoopTri &looptri, const float3 &bary_coord, - const Span corner_normals); + Span corner_normals); } // namespace blender::geometry diff --git a/source/blender/geometry/GEO_reverse_uv_sampler.hh b/source/blender/geometry/GEO_reverse_uv_sampler.hh index cb773a9e1d5..06bd9790276 100644 --- a/source/blender/geometry/GEO_reverse_uv_sampler.hh +++ b/source/blender/geometry/GEO_reverse_uv_sampler.hh @@ -21,13 +21,13 @@ namespace blender::geometry { */ class ReverseUVSampler { private: - const Span uv_map_; - const Span looptris_; + Span uv_map_; + Span looptris_; int resolution_; MultiValueMap looptris_by_cell_; public: - ReverseUVSampler(const Span uv_map, const Span looptris); + ReverseUVSampler(Span uv_map, Span looptris); enum class ResultType { None, diff --git a/source/blender/geometry/GEO_uv_pack.hh b/source/blender/geometry/GEO_uv_pack.hh index 5133406a544..102f4c14f55 100644 --- a/source/blender/geometry/GEO_uv_pack.hh +++ b/source/blender/geometry/GEO_uv_pack.hh @@ -129,18 +129,14 @@ class PackIsland { /** Unchanged by #pack_islands, used by caller. */ int caller_index; - void add_triangle(const float2 uv0, const float2 uv1, const float2 uv2); - void add_polygon(const Span uvs, MemArena *arena, Heap *heap); + void add_triangle(float2 uv0, float2 uv1, float2 uv2); + void add_polygon(Span uvs, MemArena *arena, Heap *heap); - void build_transformation(const float scale, const double rotation, float r_matrix[2][2]) const; - void build_inverse_transformation(const float scale, - const double rotation, - float r_matrix[2][2]) const; + void build_transformation(float scale, double rotation, float r_matrix[2][2]) const; + void build_inverse_transformation(float scale, double rotation, float r_matrix[2][2]) const; - float2 get_diagonal_support(const float scale, const float rotation, const float margin) const; - float2 get_diagonal_support_d4(const float scale, - const float rotation, - const float margin) const; + float2 get_diagonal_support(float scale, float rotation, float margin) const; + float2 get_diagonal_support_d4(float scale, float rotation, float margin) const; /** Center of AABB and inside-or-touching the convex hull. */ float2 pivot_; @@ -148,7 +144,7 @@ class PackIsland { float2 half_diagonal_; float pre_rotate_; - void place_(const float scale, const UVPhi phi); + void place_(float scale, UVPhi phi); void finalize_geometry_(const UVPackIsland_Params ¶ms, MemArena *arena, Heap *heap); bool can_rotate_(const UVPackIsland_Params ¶ms) const; @@ -165,7 +161,7 @@ class PackIsland { friend class OverlapMerger; }; -float pack_islands(const Span &islands, const UVPackIsland_Params ¶ms); +float pack_islands(Span islands, const UVPackIsland_Params ¶ms); /** Compute `r = mat * (a + b)` with high precision. */ void mul_v2_m2_add_v2v2(float r[2], const float mat[2][2], const float a[2], const float b[2]); diff --git a/source/blender/geometry/intern/uv_pack.cc b/source/blender/geometry/intern/uv_pack.cc index e47b1888937..d5c1e59a0c8 100644 --- a/source/blender/geometry/intern/uv_pack.cc +++ b/source/blender/geometry/intern/uv_pack.cc @@ -2245,7 +2245,7 @@ static void finalize_geometry(const Span &islands, const UVPackIsl BLI_memarena_free(arena); } -float pack_islands(const Span &islands, const UVPackIsland_Params ¶ms) +float pack_islands(const Span islands, const UVPackIsland_Params ¶ms) { BLI_assert(0.0f <= params.margin); BLI_assert(0.0f <= params.target_aspect_y); diff --git a/source/blender/nodes/NOD_node_declaration.hh b/source/blender/nodes/NOD_node_declaration.hh index 7fbe93a08b2..7f795988a27 100644 --- a/source/blender/nodes/NOD_node_declaration.hh +++ b/source/blender/nodes/NOD_node_declaration.hh @@ -303,7 +303,7 @@ class BaseSocketDeclarationBuilder { /** The input is evaluated on a subset of the geometry inputs. */ BaseSocketDeclarationBuilder &implicit_field_on(ImplicitInputValueFn fn, - const Span input_indices); + Span input_indices); /** For inputs that are evaluated or available on a subset of the geometry sockets. */ BaseSocketDeclarationBuilder &field_on(Span indices); diff --git a/source/blender/nodes/geometry/node_geometry_util.hh b/source/blender/nodes/geometry/node_geometry_util.hh index f035b207632..91228974b01 100644 --- a/source/blender/nodes/geometry/node_geometry_util.hh +++ b/source/blender/nodes/geometry/node_geometry_util.hh @@ -37,10 +37,7 @@ namespace blender::nodes { bool check_tool_context_and_error(GeoNodeExecParams ¶ms); void search_link_ops_for_tool_node(GatherLinkSearchOpParams ¶ms); -void transform_mesh(Mesh &mesh, - const float3 translation, - const math::Quaternion rotation, - const float3 scale); +void transform_mesh(Mesh &mesh, float3 translation, math::Quaternion rotation, float3 scale); void transform_geometry_set(GeoNodeExecParams ¶ms, GeometrySet &geometry, @@ -62,9 +59,9 @@ void separate_geometry(GeometrySet &geometry_set, void get_closest_in_bvhtree(BVHTreeFromMesh &tree_data, const VArray &positions, const IndexMask &mask, - const MutableSpan r_indices, - const MutableSpan r_distances_sq, - const MutableSpan r_positions); + MutableSpan r_indices, + MutableSpan r_distances_sq, + MutableSpan r_positions); int apply_offset_in_cyclic_range(IndexRange range, int start_index, int offset); @@ -101,14 +98,14 @@ const CPPType &get_simulation_item_cpp_type(eNodeSocketDatatype socket_type); const CPPType &get_simulation_item_cpp_type(const NodeSimulationItem &item); bke::bake::BakeState move_values_to_simulation_state( - const Span node_simulation_items, const Span input_values); -void move_simulation_state_to_values(const Span node_simulation_items, + Span node_simulation_items, Span input_values); +void move_simulation_state_to_values(Span node_simulation_items, bke::bake::BakeState zone_state, const Object &self_object, const ComputeContext &compute_context, const bNode &sim_output_node, Span r_output_values); -void copy_simulation_state_to_values(const Span node_simulation_items, +void copy_simulation_state_to_values(Span node_simulation_items, const bke::bake::BakeStateRef &zone_state, const Object &self_object, const ComputeContext &compute_context, @@ -120,7 +117,7 @@ void copy_with_checked_indices(const GVArray &src, const IndexMask &mask, GMutableSpan dst); -void mix_baked_data_item(const eNodeSocketDatatype socket_type, +void mix_baked_data_item(eNodeSocketDatatype socket_type, void *prev, const void *next, const float factor);