Cleanup: Use StringRef instead of StringRefNull

This commit is contained in:
Hans Goudey
2025-03-03 21:24:42 -05:00
parent 6a379f218f
commit 43be4d2f9e
2 changed files with 3 additions and 4 deletions

View File

@@ -16,8 +16,7 @@
namespace blender::draw {
GPUVertFormat init_format_for_attribute(const eCustomDataType data_type,
const StringRefNull vbo_name)
GPUVertFormat init_format_for_attribute(const eCustomDataType data_type, const StringRef vbo_name)
{
GPUVertFormat format{};
bke::attribute_math::convert_to_static_type(data_type, [&](auto dummy) {
@@ -25,7 +24,7 @@ GPUVertFormat init_format_for_attribute(const eCustomDataType data_type,
using Converter = AttributeConverter<T>;
if constexpr (!std::is_void_v<typename Converter::VBOType>) {
GPU_vertformat_attr_add(&format,
vbo_name.c_str(),
vbo_name,
Converter::gpu_component_type,
Converter::gpu_component_len,
Converter::gpu_fetch_mode);

View File

@@ -141,7 +141,7 @@ template<> struct AttributeConverter<math::Quaternion> {
}
};
GPUVertFormat init_format_for_attribute(eCustomDataType data_type, StringRefNull vbo_name);
GPUVertFormat init_format_for_attribute(eCustomDataType data_type, StringRef vbo_name);
void vertbuf_data_extract_direct(GSpan attribute, gpu::VertBuf &vbo);