(my += function is similar, which I’m sure a lot of people do the same)
Is there any reason why Epic uses such a lengthy macro just to increment? Is the macro faster to access a reference like this? (While its fairly trivial, the macro also does take up more code everytime it’s used in a blueprint.)
Am I missing something here? I’m trying to figure out if Epic does this for a reason. Or is this just leftover from the 4.x or earlier days?
Any other “tips” people might have for optimizing similar blueprint library functions/macros?
The only thing I can think of, is their macro works with non-reference values too? Maybe that’s why?
I can’t think of any reason why I would care about ++ if it wasn’t to actually increment that variable, so I would assume the function is fine (and or better)?
It’s not ++ that is complex, it’s ManipulateIntInternal that can be used in different places as well.
The key difference is: the NewValue can be any number, not just value+1. Looking at the way it’s written, it looks like it’s suppose to avoid some corner case with something like self-assigning (X=X).
this for a reason. Or is this just leftover
No idea, this answer for this would need a way deeper research