Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating Arrays and PoolArrays #99

Open
geekrelief opened this issue May 13, 2021 · 1 comment
Open

Creating Arrays and PoolArrays #99

geekrelief opened this issue May 13, 2021 · 1 comment

Comments

@geekrelief
Copy link
Contributor

geekrelief commented May 13, 2021

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
Copy link
Contributor Author

PR #100 cleans this up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant