From 8a3ff496a737daa9ce5a33c2699ac0b20e52e8f0 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Sat, 18 Jun 2022 11:40:46 +0200 Subject: Cleanup: Remove unnecessary switch statement The types are retrieved by the attribute matching above anyway, there is no reason to have another switch based on the type. --- .../blender/draw/intern/draw_cache_impl_curves.cc | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/source/blender/draw/intern/draw_cache_impl_curves.cc b/source/blender/draw/intern/draw_cache_impl_curves.cc index 68ca1153c96..6e2b7bc758c 100644 --- a/source/blender/draw/intern/draw_cache_impl_curves.cc +++ b/source/blender/draw/intern/draw_cache_impl_curves.cc @@ -529,24 +529,10 @@ static bool curves_ensure_attributes(const Curves &curves, continue; } - switch (type) { - case CD_PROP_BOOL: - case CD_PROP_INT8: - case CD_PROP_INT32: - case CD_PROP_FLOAT: - case CD_PROP_FLOAT2: - case CD_PROP_FLOAT3: - case CD_PROP_COLOR: { - DRW_AttributeRequest *request = drw_attributes_add_request( - &attrs_needed, type, layer_index, domain); - if (request) { - BLI_strncpy(request->attribute_name, name, sizeof(request->attribute_name)); - } - - break; - } - default: - break; + DRW_AttributeRequest *request = drw_attributes_add_request( + &attrs_needed, type, layer_index, domain); + if (request) { + BLI_strncpy(request->attribute_name, name, sizeof(request->attribute_name)); } } -- cgit v1.2.3