OMNI_UNUSED
MACRO

OMNI_UNUSED - Can be used to avoid 'unused' warnings in user code.

SYNOPSIS top

This helper macro is simply defined as the following:
#define OMNI_UNUSED(val) (static_cast<void>(val))

DESCRIPTION top

This helper macro can be used to avoid "unused warnings". Though it's typically a good idea to just remove unused variables, there are instances where one might wish to have a variable without use (maybe for upgrades or future use). To this, if you have certain compiler options enabled, you might see erroneous warnings to 'unused variables' in your code, to avoid this you can wrap the variable in this macro and search for it later should you need to refactor, example:
int some_function(int var1, int var2, int var3)
{
    // var3 is unused at the moment
    OMNI_UNUSED(var3);
    return var1*var2;
}

CONSIDERATIONS top

No special consideration.

PLATFORM SPECIFIC top

No special consideration.

NOTES top

This flag has no effect on the library itself; it does not change any code and is simply for user code (i.e. code not within the library).