Skip to content

Creating Arrays and PoolArrays #99

@geekrelief

Description

@geekrelief

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions