Closed SamVanheer closed 2 years ago
The assumption here was that making magic_map const would cause it to be statically created and referenced, rather than created on every call to Load(). Is that not the case? Would it then be simplest to just add
static
to magic_map to accomplish it?
That's the simplest way, but that will add a compiler-generated check to see if it has been initialized every time the function is called. This function can be called thousands of times in a short time period so that extra overhead can add up.
Are there any changes that need to be made or is this fine?
The change looks good to me. Thanks for the answer to my question, I see why you structured it that way.
@SamVanheer Could you resolve the conflict -- then I'll be happy to merge!
@ddiakopoulos Should be good now.
Fixes #65