Hello
Found the following pattern of checking if a key exists in a dictionary and then checking the value: if (dict.ContainKey(key) && dict[key] == value)
this does 2 lookups, and can be optimized to do just one:
Even if there is no apparent performance impact, it’s still good to keep with good practices.
I’ve just changed the code there, which hopefully isn’t similar anywhere else.
(PlayAnimationAdvanced does not have any dictionary usage by the way)
Thank you.
Join us on Discord: https://discord.gg/97q2Rjh
Author
Posts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Login
Register
By registering on this website you agree to our Privacy Policy.