Commit: 8a3ff496a737daa9ce5a33c2699ac0b20e52e8f0
Author: Hans Goudey
Date: Sat Jun 18 11:40:46 2022 +0200
Branches: master
https://developer.blender.org/rB8a3ff496a737daa9ce5a33c2699ac0b20e52e8f0
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.
===================================================================
M source/blender/draw/intern/draw_cache_impl_curves.cc
===================================================================
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));
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs