diff options
author | Hans Goudey <h.goudey@me.com> | 2022-06-18 12:40:46 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-06-18 12:40:46 +0300 |
commit | 8a3ff496a737daa9ce5a33c2699ac0b20e52e8f0 (patch) | |
tree | cc05906869887a3707dd12bf0d407730133fe11e /source | |
parent | 498f079d2c3644b47ff5c004bc1cf93a9ba6604b (diff) |
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.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/draw/intern/draw_cache_impl_curves.cc | 22 |
1 files 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)); } } |