This way we'll get a compiler warning when a new brush type is added, and not handled in the switch. Plus a runtime warning when an invalid value is cast to the enum. Both can help catching errors.
This way we'll get a compiler warning when a new brush type is added, and not handled in the switch. Plus a runtime warning when an invalid value is cast to the enum. Both can help catching errors.