Originally posted by parksie
The first way, it knows that you're not changing it, so it can just inline the direct call.
It will inline it if you put inline (or forceinline in msvc, or autoinline) anyway, difference is that the function will be an accessor