Loading...
Searching...
No Matches
Compiler Aids

Classes/functions that help getting code compiled cleanly. More...

Macros

#define TF_UNUSED(x)   (void) x
 Stops compiler from producing unused argument or variable warnings.
 

Detailed Description

Classes/functions that help getting code compiled cleanly.

Macro Definition Documentation

◆ TF_UNUSED

#define TF_UNUSED (   x)    (void) x

Stops compiler from producing unused argument or variable warnings.

This is useful mainly in C, because in C++ you can just leave the variable unnamed. However, there are situations where this can be useful even in C++, such as

void
MyClass::Method( int foo )
{
#if defined(__APPLE__)
TF_UNUSED( foo );
// do something that doesn't need foo...
#else
// do something that needs foo
#endif
}
#define TF_UNUSED(x)
Stops compiler from producing unused argument or variable warnings.
Definition: tf.h:185

Definition at line 185 of file tf.h.