That makes sense, personally I find the macro a better method of self documenting code than the inline comment, which is why I have the macro in my cross platform code.
If you think it is a better fix to add the comment, I will do that, but I think it is cleaner ( as much as I dislike macros ) to continue to use the macro and/or to rename the macro to something Casablanca specific.
Lastly, the following code snippet will still produce a warning in xcode on release builds
In short I would rather put an ifndef before the macro, and/or rename the macro unless you strongly disagree with that answer.
Thoughts?
If you think it is a better fix to add the comment, I will do that, but I think it is cleaner ( as much as I dislike macros ) to continue to use the macro and/or to rename the macro to something Casablanca specific.
Lastly, the following code snippet will still produce a warning in xcode on release builds
bool success = SomeFunction();
MY_CUSTOM_ASSERT_MACRO_THAT_IS_A_NOOP_IN_A_RELASE_BUILD(success);
success; // unreferenced parameter
Changing the last line to:(void) success; // unreferenced parameter
will remove the warning, but it seems less readable to me to add (void) varname; in place of the macroIn short I would rather put an ifndef before the macro, and/or rename the macro unless you strongly disagree with that answer.
Thoughts?