-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
ArrayMap does not support square bracket assignment #176
Comments
You have to create an extension function for it: operator fun <K, V> ArrayMap<K, V>.set(key: K, value: V) {
put(key, value)
} Eventually it could be added to |
yeah, hoped it's already been there - thank you :) |
LibGDX introduced a lot of custom collections without a common interface, which makes adding such extensions very redundant. We focused on the most common collections. As of writing this, |
Yeah, but it had been said, that the libgdx implementations are more efficient and use less storage. Nevermind, I did what jcornaz explained and extended it myself. Thank you. |
@limbusdev FYI, from the documentation:
I still think we could add some basic utility methods for |
Removed some spam. |
…ent_for_array_map Added square bracket assignment support for ArrayMap. #176
Hi,
great extension to libGDX :) thank you for that.
My question: how can square brackets be used with libKTX ArrayMaps?
what I wanted to to:
But there is no Set operator defined. Am I doing something wrong, or isn't it just implemented yet?
Cheers
The text was updated successfully, but these errors were encountered: