floooh / sokol-nim

nim bindings for https://github.com/floooh/sokol
MIT License
76 stars 14 forks source link

Generated converters have incorrect assertions #26

Closed geotre closed 7 months ago

geotre commented 7 months ago

The Nim bindings generator creates converters for many types that contain a static assert, e.g.:

converter toPassActioncolors*[N:static[int]](items: array[N, ColorAttachmentAction]): array[4, ColorAttachmentAction] =
  static: assert(N < 4)
  for index,item in items.pairs: result[index]=item

The assert needs to be <= not < right?

Opening a PR

floooh commented 7 months ago

Yeah looks like a got that wrong. Thanks for the PR, will merge right away.

floooh commented 7 months ago

Closing ticket because PR has been merged.