COMMON: Add SCUMMVM_CURRENT_FUNCTION macro (useful for debugging)
svn-id: r53931
This commit is contained in:
parent
ecd3e29fe0
commit
c0063a6d50
1 changed files with 14 additions and 0 deletions
|
@ -63,6 +63,20 @@ template<typename T> inline void SWAP(T &a, T &b) { T tmp = a; a = b; b = tmp; }
|
|||
#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0])))
|
||||
|
||||
|
||||
/**
|
||||
* @def SCUMMVM_CURRENT_FUNCTION
|
||||
* This macro evaluates to the current function's name on compilers supporting this.
|
||||
*/
|
||||
#if defined(__GNUC__)
|
||||
# define SCUMMVM_CURRENT_FUNCTION __PRETTY_FUNCTION__
|
||||
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
|
||||
# define SCUMMVM_CURRENT_FUNCTION __func__
|
||||
#elif defined(_MSC_VER) && _MSC_VER >= 1300
|
||||
# define SCUMMVM_CURRENT_FUNCTION __FUNCTION__
|
||||
#else
|
||||
# define SCUMMVM_CURRENT_FUNCTION "<unknown>"
|
||||
#endif
|
||||
|
||||
namespace Common {
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue