Should there be a specialized HashMap<>? #4973
kidmosey
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When working on the fix for #61808, I resolved it to the fact that one of the overloads for
HashMap<>.operator[]
inserts a default value instead of throwing an error like the other overload.Assuming this is by design, would it be a good idea to have a specialization to
HashMap<>
that disables the insert functionality? Then in cases like the animation node states, where adding a default value isn't desired behavior, we would be able to catch potential issues ahead of time if anyone forgets to do aHashMap<>.has()
before each lookup.Beta Was this translation helpful? Give feedback.
All reactions