4 ms·
Swift enums are considerably different from C/Obj-C enums so the cast is unavoidable. Specifically unlike C enums, Swift enums can be backed by non-integer type
by potatolicious 11y ago
Swift enums are considerably different from C/Obj-C enums so the cast is unavoidable. Specifically unlike C enums, Swift enums can be backed by non-integer types like Strings.
For numeric types that have a clear equivalence in C-land, Swift is seamless.
- comex 11y agoActually, GLenum is not a C enum in the first place; it's just an integer typedef.