diff --git a/source/blender/editors/space_file/asset_catalog_tree_view.cc b/source/blender/editors/space_file/asset_catalog_tree_view.cc index 28205756b4f..a366e9e5367 100644 --- a/source/blender/editors/space_file/asset_catalog_tree_view.cc +++ b/source/blender/editors/space_file/asset_catalog_tree_view.cc @@ -405,8 +405,8 @@ std::string AssetCatalogDropTarget::drop_tooltip_asset_catalog(const wmDrag &dra const AssetCatalog *src_catalog = get_drag_catalog(drag, get_asset_library()); return fmt::format(TIP_("Move catalog {} into {}"), - (std::string_view)src_catalog->path.name(), - (std::string_view)catalog_item_.get_name()); + std::string_view(src_catalog->path.name()), + std::string_view(catalog_item_.get_name())); } std::string AssetCatalogDropTarget::drop_tooltip_asset_list(const wmDrag &drag) const @@ -620,7 +620,7 @@ std::string AssetCatalogTreeViewAllItem::DropTarget::drop_tooltip(const wmDrag & drag, *get_view().asset_library_); return fmt::format(TIP_("Move catalog {} to the top level of the tree"), - (std::string_view)drag_catalog->path.name()); + std::string_view(drag_catalog->path.name())); } bool AssetCatalogTreeViewAllItem::DropTarget::on_drop(bContext * /*C*/, const wmDrag &drag) const diff --git a/source/blender/io/ply/exporter/ply_file_buffer.cc b/source/blender/io/ply/exporter/ply_file_buffer.cc index d78ff4cb29f..efb4df3d48e 100644 --- a/source/blender/io/ply/exporter/ply_file_buffer.cc +++ b/source/blender/io/ply/exporter/ply_file_buffer.cc @@ -42,11 +42,11 @@ void FileBuffer::close_file() void FileBuffer::write_header_element(StringRef name, int count) { - write_fstring("element {} {}\n", (std::string_view)name, count); + write_fstring("element {} {}\n", std::string_view(name), count); } void FileBuffer::write_header_scalar_property(StringRef dataType, StringRef name) { - write_fstring("property {} {}\n", (std::string_view)dataType, (std::string_view)name); + write_fstring("property {} {}\n", std::string_view(dataType), std::string_view(name)); } void FileBuffer::write_header_list_property(StringRef countType, @@ -54,14 +54,14 @@ void FileBuffer::write_header_list_property(StringRef countType, StringRef name) { write_fstring("property list {} {} {}\n", - (std::string_view)countType, - (std::string_view)dataType, - (std::string_view)name); + std::string_view(countType), + std::string_view(dataType), + std::string_view(name)); } void FileBuffer::write_string(StringRef s) { - write_fstring("{}\n", (std::string_view)s); + write_fstring("{}\n", std::string_view(s)); } void FileBuffer::write_newline() diff --git a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh index 7ef8abaea45..159c8bfc810 100644 --- a/source/blender/io/wavefront_obj/exporter/obj_export_io.hh +++ b/source/blender/io/wavefront_obj/exporter/obj_export_io.hh @@ -109,11 +109,11 @@ class FormatHandler : NonCopyable, NonMovable { } void write_obj_usemtl(StringRef s) { - write_impl("usemtl {}\n", (std::string_view)s); + write_impl("usemtl {}\n", std::string_view(s)); } void write_obj_mtllib(StringRef s) { - write_impl("mtllib {}\n", (std::string_view)s); + write_impl("mtllib {}\n", std::string_view(s)); } void write_obj_smooth(int s) { @@ -121,11 +121,11 @@ class FormatHandler : NonCopyable, NonMovable { } void write_obj_group(StringRef s) { - write_impl("g {}\n", (std::string_view)s); + write_impl("g {}\n", std::string_view(s)); } void write_obj_object(StringRef s) { - write_impl("o {}\n", (std::string_view)s); + write_impl("o {}\n", std::string_view(s)); } void write_obj_edge(int a, int b) { @@ -170,7 +170,7 @@ class FormatHandler : NonCopyable, NonMovable { void write_mtl_newmtl(StringRef s) { - write_impl("newmtl {}\n", (std::string_view)s); + write_impl("newmtl {}\n", std::string_view(s)); } void write_mtl_float(const char *type, float v) { @@ -187,12 +187,12 @@ class FormatHandler : NonCopyable, NonMovable { /* NOTE: options, if present, will have its own leading space. */ void write_mtl_map(const char *type, StringRef options, StringRef value) { - write_impl("{}{} {}\n", type, (std::string_view)options, (std::string_view)value); + write_impl("{}{} {}\n", type, std::string_view(options), std::string_view(value)); } void write_string(StringRef s) { - write_impl("{}\n", (std::string_view)s); + write_impl("{}\n", std::string_view(s)); } private: