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.
This commit is contained in:
parent
498f079d2c
commit
8a3ff496a7
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue