Creating Arrays and PoolArrays
geekrelief opened this issue · 1 comments
geekrelief commented
Am I missing something or should there be an easier way to define Arrays and PoolArrays?
I had to do this
newPoolVector2Array(newArray(a.toVariant(), b.toVariant(), c.toVariant()))
which looks ugly.
I noticed the pool arrays only takes an Array
, and Array
only takes varargs[Variant]
or an openarray[Variant]
. So I modified Array
's newArray
to
proc newArray*(s: varargs[Variant, `newVariant`]): Array
and added new constructors for the pool arrays so I can do call:
newPoolVector2Array(a, b, c)
I can make a PR for this.
geekrelief commented
PR #100 cleans this up.