In a Release build, macros like CSFML_CHECK_RETURN expand into nothing more than a cast-to-void which is meant to silence compiler warnings about unused variables.
By declaring a temporary inside the macro argument, we ensure that debug builds behave the same as always but Release builds expand these macros into truly no code thus ensuring these temporary variables are never created in the first place so there is now nothing that we have to cast to void.
In a Release build, macros like
CSFML_CHECK_RETURN
expand into nothing more than a cast-to-void which is meant to silence compiler warnings about unused variables.By declaring a temporary inside the macro argument, we ensure that debug builds behave the same as always but Release builds expand these macros into truly no code thus ensuring these temporary variables are never created in the first place so there is now nothing that we have to cast to void.