Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
}
+static enum range get_range_for_component_type(enum component_type type) +{
- switch (type)
- {
- case CTYPE_SNORM:
return RANGE_SNORM;
- case CTYPE_LUMA:
- case CTYPE_INDEX:
- case CTYPE_UNORM:
return RANGE_UNORM;
- default:
return RANGE_FULL;
As an alternative, you could keep the `default:` label for unexpected values and make sure to explicitly list all the proper enum constants, like in the current code. Mostly just to make sure we don't forget to update this when adding a new type.
BTW, I think we usually indent the switch labels in "modern d3d style".