this can be slightly less boilerplatey and error-checked if you fancy:
from macros import error
type FileBits = (
when BitDepth == 8: uint8
elif BitDepth == 16: uint16
elif BitDepth in {24,32}: uint32
elif BitDepth == 64: uint64
else: static: error("bitdepth of " & $BitDepth & "unsupported"); nil
)
Run
- select a type ingo
- select a type sky_khan
- select a type ingo
- select a type Zoom
- select a type sky_khan
- select a type ingo
- select a type shirleyquirk
- select a type sky_khan
- select a type shirleyquirk
- select a type ingo
- select a type Araq
