diff --git a/source/blender/animrig/ANIM_keyframing.hh b/source/blender/animrig/ANIM_keyframing.hh index 5764ef39deb..3b08302dfc6 100644 --- a/source/blender/animrig/ANIM_keyframing.hh +++ b/source/blender/animrig/ANIM_keyframing.hh @@ -94,7 +94,7 @@ class CombinedKeyingResult { * "Object Transforms" channel group name. */ std::optional default_channel_group_for_path(const PointerRNA *animated_struct, - const StringRef prop_rna_path); + StringRef prop_rna_path); /* -------------------------------------------------------------------- */ diff --git a/source/blender/blenkernel/BKE_attribute.h b/source/blender/blenkernel/BKE_attribute.h index fded32c03eb..e79869dc508 100644 --- a/source/blender/blenkernel/BKE_attribute.h +++ b/source/blender/blenkernel/BKE_attribute.h @@ -152,10 +152,9 @@ void BKE_id_attributes_default_color_set(struct ID *id, std::optional lookup_meta_data(const StringRef attribute_id) const; + std::optional lookup_meta_data(StringRef attribute_id) const; /** * \return True, when attributes can exist on that domain. diff --git a/source/blender/blenkernel/BKE_bake_items_paths.hh b/source/blender/blenkernel/BKE_bake_items_paths.hh index 798cd749fd2..6cea6f57864 100644 --- a/source/blender/blenkernel/BKE_bake_items_paths.hh +++ b/source/blender/blenkernel/BKE_bake_items_paths.hh @@ -36,8 +36,8 @@ struct BakePath { }; std::string frame_to_file_name(const SubFrame &frame); -std::optional file_name_to_frame(const StringRef file_name); +std::optional file_name_to_frame(StringRef file_name); -Vector find_sorted_meta_files(const StringRefNull meta_dir); +Vector find_sorted_meta_files(StringRefNull meta_dir); } // namespace blender::bke::bake diff --git a/source/blender/blenkernel/BKE_cryptomatte.hh b/source/blender/blenkernel/BKE_cryptomatte.hh index 80dcf9045f2..6efd5ea4356 100644 --- a/source/blender/blenkernel/BKE_cryptomatte.hh +++ b/source/blender/blenkernel/BKE_cryptomatte.hh @@ -31,8 +31,7 @@ namespace blender::bke::cryptomatte { * The output of this function is: * 'cryptomatte/{hash of layer_name}/{key_name}'. */ -std::string BKE_cryptomatte_meta_data_key(const StringRef layer_name, - const StringRefNull key_name); +std::string BKE_cryptomatte_meta_data_key(StringRef layer_name, StringRefNull key_name); /** * Extract the cryptomatte layer name from the given `render_pass_name`. @@ -49,7 +48,7 @@ std::string BKE_cryptomatte_meta_data_key(const StringRef layer_name, * \note The return type is a sub-string of `render_pass_name` and therefore cannot outlive the * `render_pass_name` internal data. */ -StringRef BKE_cryptomatte_extract_layer_name(const StringRef render_pass_name); +StringRef BKE_cryptomatte_extract_layer_name(StringRef render_pass_name); struct CryptomatteHash { uint32_t hash; @@ -129,8 +128,7 @@ struct CryptomatteStampDataCallbackData { const blender::Vector &BKE_cryptomatte_layer_names_get( const CryptomatteSession &session); -CryptomatteLayer *BKE_cryptomatte_layer_get(CryptomatteSession &session, - const StringRef layer_name); +CryptomatteLayer *BKE_cryptomatte_layer_get(CryptomatteSession &session, StringRef layer_name); struct CryptomatteSessionDeleter { void operator()(CryptomatteSession *session) diff --git a/source/blender/blenkernel/BKE_file_handler.hh b/source/blender/blenkernel/BKE_file_handler.hh index 7020ad26fa2..27844131432 100644 --- a/source/blender/blenkernel/BKE_file_handler.hh +++ b/source/blender/blenkernel/BKE_file_handler.hh @@ -46,7 +46,7 @@ struct FileHandlerType { /** * Generate a default file name for use with this file handler. */ - std::string get_default_filename(const StringRefNull name); + std::string get_default_filename(StringRefNull name); }; /** diff --git a/source/blender/blenkernel/BKE_grease_pencil.hh b/source/blender/blenkernel/BKE_grease_pencil.hh index d89f5eeae86..25baddabfa8 100644 --- a/source/blender/blenkernel/BKE_grease_pencil.hh +++ b/source/blender/blenkernel/BKE_grease_pencil.hh @@ -585,14 +585,14 @@ class Layer : public ::GreasePencilLayer { * armature. */ StringRefNull parent_bone_name() const; - void set_parent_bone_name(const StringRef new_name); + void set_parent_bone_name(StringRef new_name); /** * Returns the view layer name that this layer should be rendered in or an empty * `StringRefNull` if no such name is set. */ StringRefNull view_layer_name() const; - void set_view_layer_name(const StringRef new_name); + void set_view_layer_name(StringRef new_name); private: /** diff --git a/source/blender/blenkernel/BKE_grease_pencil_vertex_groups.hh b/source/blender/blenkernel/BKE_grease_pencil_vertex_groups.hh index 56021697ab8..aa06115cde7 100644 --- a/source/blender/blenkernel/BKE_grease_pencil_vertex_groups.hh +++ b/source/blender/blenkernel/BKE_grease_pencil_vertex_groups.hh @@ -19,7 +19,7 @@ namespace blender::bke::greasepencil { void validate_drawing_vertex_groups(GreasePencil &grease_pencil); /** Find or create a vertex group in a drawing. */ -int ensure_vertex_group(const StringRef name, ListBase &vertex_group_names); +int ensure_vertex_group(StringRef name, ListBase &vertex_group_names); /** Assign selected vertices to the vertex group. */ void assign_to_vertex_group(Drawing &drawing, StringRef name, float weight); diff --git a/source/blender/blenkernel/BKE_node_tree_interface.hh b/source/blender/blenkernel/BKE_node_tree_interface.hh index e9705e17c31..9a48e2305c9 100644 --- a/source/blender/blenkernel/BKE_node_tree_interface.hh +++ b/source/blender/blenkernel/BKE_node_tree_interface.hh @@ -288,8 +288,8 @@ template const T &get_socket_data_as(const bNodeTreeInterfaceSocket bNodeTreeInterfaceSocket *add_interface_socket_from_node(bNodeTree &ntree, const bNode &from_node, const bNodeSocket &from_sock, - const StringRef socket_type, - const StringRef name); + StringRef socket_type, + StringRef name); inline bNodeTreeInterfaceSocket *add_interface_socket_from_node(bNodeTree &ntree, const bNode &from_node, diff --git a/source/blender/blenlib/BLI_serialize.hh b/source/blender/blenlib/BLI_serialize.hh index f0585a9332c..e3ef55286d4 100644 --- a/source/blender/blenlib/BLI_serialize.hh +++ b/source/blender/blenlib/BLI_serialize.hh @@ -253,12 +253,12 @@ class DictionaryValue : public Value { */ Lookup create_lookup() const; - const std::shared_ptr *lookup(const StringRef key) const; - std::optional lookup_str(const StringRef key) const; - std::optional lookup_int(const StringRef key) const; - std::optional lookup_double(const StringRef key) const; - const DictionaryValue *lookup_dict(const StringRef key) const; - const ArrayValue *lookup_array(const StringRef key) const; + const std::shared_ptr *lookup(StringRef key) const; + std::optional lookup_str(StringRef key) const; + std::optional lookup_int(StringRef key) const; + std::optional lookup_double(StringRef key) const; + const DictionaryValue *lookup_dict(StringRef key) const; + const ArrayValue *lookup_array(StringRef key) const; Span elements() const { return values_; diff --git a/source/blender/blenlib/BLI_uuid.h b/source/blender/blenlib/BLI_uuid.h index 7512e348591..b371b720978 100644 --- a/source/blender/blenlib/BLI_uuid.h +++ b/source/blender/blenlib/BLI_uuid.h @@ -73,7 +73,7 @@ class bUUID : public ::bUUID { bUUID(std::initializer_list field_values); /** Initialize by parsing the string; undefined behavior when the string is invalid. */ - explicit bUUID(const StringRefNull string_formatted_uuid); + explicit bUUID(StringRefNull string_formatted_uuid); /** Return the UUID as formatted ASCII string, see #BLI_uuid_format(). */ std::string str() const; diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.hh b/source/blender/bmesh/intern/bmesh_mesh_convert.hh index aac6b31333e..47dba680481 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.hh +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.hh @@ -16,7 +16,7 @@ * \return Whether attributes with the given name are stored in special flags or fields in BMesh * rather than in the regular custom data blocks. */ -bool BM_attribute_stored_in_bmesh_builtin(const blender::StringRef name); +bool BM_attribute_stored_in_bmesh_builtin(blender::StringRef name); struct CustomData_MeshMasks; struct Main; diff --git a/source/blender/compositor/COM_shader_node.hh b/source/blender/compositor/COM_shader_node.hh index 2ec9d90bb60..e56f7c80a0e 100644 --- a/source/blender/compositor/COM_shader_node.hh +++ b/source/blender/compositor/COM_shader_node.hh @@ -51,10 +51,10 @@ class ShaderNode { void compile(GPUMaterial *material); /* Returns the GPU node stack of the input with the given identifier. */ - GPUNodeStack &get_input(const StringRef identifier); + GPUNodeStack &get_input(StringRef identifier); /* Returns the GPU node stack of the output with the given identifier. */ - GPUNodeStack &get_output(const StringRef identifier); + GPUNodeStack &get_output(StringRef identifier); private: /* Populate the inputs of the node. The input link is set to nullptr and is expected to be diff --git a/source/blender/compositor/utilities/COM_utilities_gpu_material.hh b/source/blender/compositor/utilities/COM_utilities_gpu_material.hh index 7d195560412..08a3989fedb 100644 --- a/source/blender/compositor/utilities/COM_utilities_gpu_material.hh +++ b/source/blender/compositor/utilities/COM_utilities_gpu_material.hh @@ -16,13 +16,13 @@ namespace blender::compositor { * given inputs stack array. See the ShaderNode class for more information. */ GPUNodeStack &get_shader_node_input(const bNode &node, GPUNodeStack inputs[], - const StringRef identifier); + StringRef identifier); /* Returns the GPU node stack of the output with the given identifier in the given node within the * given output stack array. See the ShaderNode class for more information. */ GPUNodeStack &get_shader_node_output(const bNode &node, GPUNodeStack outputs[], - const StringRef identifier); + StringRef identifier); /* Returns the GPU node link of the input with the given identifier in the given node within the * given inputs stack array, if the input is not linked, a uniform link carrying the value of the @@ -31,6 +31,6 @@ GPUNodeStack &get_shader_node_output(const bNode &node, * information. */ GPUNodeLink *get_shader_node_input_link(const bNode &node, GPUNodeStack inputs[], - const StringRef identifier); + StringRef identifier); } // namespace blender::compositor diff --git a/source/blender/editors/asset/ED_asset_shelf.hh b/source/blender/editors/asset/ED_asset_shelf.hh index f4612d3a6cb..818d92f6c1d 100644 --- a/source/blender/editors/asset/ED_asset_shelf.hh +++ b/source/blender/editors/asset/ED_asset_shelf.hh @@ -83,7 +83,7 @@ void type_unregister(const AssetShelfType &shelf_type); * Permanent/non-popup asset shelf regions should use #type_poll_for_space_type() instead. */ bool type_poll_for_popup(const bContext &C, const AssetShelfType *shelf_type); -AssetShelfType *type_find_from_idname(const StringRef idname); +AssetShelfType *type_find_from_idname(StringRef idname); /** \} */ diff --git a/source/blender/editors/include/ED_asset.hh b/source/blender/editors/include/ED_asset.hh index 000195b070c..0f74dc2905a 100644 --- a/source/blender/editors/include/ED_asset.hh +++ b/source/blender/editors/include/ED_asset.hh @@ -57,7 +57,7 @@ AssetLibraryReference get_asset_library_ref_from_opptr(PointerRNA &ptr); void visit_library_catalogs_catalog_for_search( const Main &bmain, const AssetLibraryReference lib, - const StringRef edit_text, + StringRef edit_text, const FunctionRef visit_fn); } // namespace blender::ed::asset diff --git a/source/blender/editors/include/ED_curves.hh b/source/blender/editors/include/ED_curves.hh index 7aedb3fa870..628882a8ade 100644 --- a/source/blender/editors/include/ED_curves.hh +++ b/source/blender/editors/include/ED_curves.hh @@ -81,7 +81,7 @@ void remove_selection_attributes( Span get_selection_attribute_positions( const bke::CurvesGeometry &curves, const bke::crazyspace::GeometryDeformation &deformation, - const StringRef attribute_name); + StringRef attribute_name); using SelectionRangeFn = FunctionRef positions, StringRef selection_attribute_name)>; diff --git a/source/blender/editors/include/UI_interface_c.hh b/source/blender/editors/include/UI_interface_c.hh index 0b17b8daf0a..f70387b5bed 100644 --- a/source/blender/editors/include/UI_interface_c.hh +++ b/source/blender/editors/include/UI_interface_c.hh @@ -1197,7 +1197,7 @@ uiBut *uiDefButR(uiBlock *block, short width, short height, PointerRNA *ptr, - const blender::StringRefNull propname, + blender::StringRefNull propname, int index, float min, float max, @@ -2428,8 +2428,8 @@ uiLayout *uiLayoutPanelProp(const bContext *C, uiLayout *uiLayoutPanelPropWithBoolHeader(const bContext *C, uiLayout *layout, PointerRNA *open_prop_owner, - const blender::StringRefNull open_prop_name, - const blender::StringRefNull bool_prop_name, + blender::StringRefNull open_prop_name, + blender::StringRefNull bool_prop_name, const std::optional label); /** @@ -2726,7 +2726,7 @@ void uiTemplateStatusInfo(uiLayout *layout, bContext *C); void uiTemplateKeymapItemProperties(uiLayout *layout, PointerRNA *ptr); bool uiTemplateEventFromKeymapItem(uiLayout *layout, - const blender::StringRefNull text, + blender::StringRefNull text, const wmKeyMapItem *kmi, bool text_fallback); diff --git a/source/blender/editors/interface/interface_intern.hh b/source/blender/editors/interface/interface_intern.hh index 778e14291ad..ba839e4a64c 100644 --- a/source/blender/editors/interface/interface_intern.hh +++ b/source/blender/editors/interface/interface_intern.hh @@ -1059,7 +1059,7 @@ uiPopupBlockHandle *ui_popover_panel_create(bContext *C, */ void ui_pie_menu_level_create(uiBlock *block, wmOperatorType *ot, - const blender::StringRefNull propname, + blender::StringRefNull propname, IDProperty *properties, const EnumPropertyItem *items, int totitem, diff --git a/source/blender/io/usd/intern/usd_armature_utils.hh b/source/blender/io/usd/intern/usd_armature_utils.hh index 64d6bbefb97..78a198da880 100644 --- a/source/blender/io/usd/intern/usd_armature_utils.hh +++ b/source/blender/io/usd/intern/usd_armature_utils.hh @@ -105,7 +105,7 @@ const Object *get_armature_modifier_obj(const Object &obj, const Depsgraph *deps * bone name is found or if the object does not have an armature modifier */ bool is_armature_modifier_bone_name(const Object &obj, - const StringRefNull name, + StringRefNull name, const Depsgraph *depsgraph); /** diff --git a/source/blender/io/usd/intern/usd_writer_mesh.hh b/source/blender/io/usd/intern/usd_writer_mesh.hh index a750fe132e1..29ffc5d39da 100644 --- a/source/blender/io/usd/intern/usd_writer_mesh.hh +++ b/source/blender/io/usd/intern/usd_writer_mesh.hh @@ -53,7 +53,7 @@ class USDGenericMeshWriter : public USDAbstractWriter { const bke::AttributeIter &attr); void write_uv_data(const pxr::UsdGeomMesh &usd_mesh, const bke::AttributeIter &attr, - const StringRef active_uvmap_name); + StringRef active_uvmap_name); }; class USDMeshWriter : public USDGenericMeshWriter { diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh index cae5d0848d2..e58f8e73c81 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_file_writer.hh @@ -58,7 +58,7 @@ class OBJWriter : NonMovable, NonCopyable { /** * Write file name of Material Library in `.OBJ` file. */ - void write_mtllib_name(const StringRefNull mtl_filepath) const; + void write_mtllib_name(StringRefNull mtl_filepath) const; /** * Write vertex coordinates for all vertices as "v x y z" or "v x y z r g b". */ diff --git a/source/blender/nodes/shader/materialx/node_graph.h b/source/blender/nodes/shader/materialx/node_graph.h index 4f88246913c..136644f890a 100644 --- a/source/blender/nodes/shader/materialx/node_graph.h +++ b/source/blender/nodes/shader/materialx/node_graph.h @@ -33,16 +33,16 @@ struct NodeGraph { const Material *material, const ExportParams &export_params, const MaterialX::DocumentPtr &document); - NodeGraph(const NodeGraph &parent, const StringRef child_name); + NodeGraph(const NodeGraph &parent, StringRef child_name); NodeItem empty_node() const; - NodeItem get_node(const StringRef name) const; - NodeItem get_output(const StringRef name) const; - NodeItem get_input(const StringRef name) const; + NodeItem get_node(StringRef name) const; + NodeItem get_output(StringRef name) const; + NodeItem get_input(StringRef name) const; std::string unique_node_name(const bNode *node, - const StringRef socket_out_name, - const NodeItem::Type to_type); + StringRef socket_out_name, + NodeItem::Type to_type); void set_output_node_name(const NodeItem &item) const; static std::string unique_anonymous_node_name(MaterialX::GraphElement *graph_element);