define __func__ as __FUNCTION__...
...if the former isn't found and the latter is. This also allows removing the sunos special VALIDATE version
This commit is contained in:
parent
a72de56f6f
commit
121606bde9
1 changed files with 6 additions and 5 deletions
|
@ -39,13 +39,14 @@ class display;
|
|||
#endif
|
||||
#endif
|
||||
|
||||
// Sun Studio compilers call __func__ not __FUNCTION__
|
||||
#ifdef __SUNPRO_CC
|
||||
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
|
||||
#else
|
||||
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __FUNCTION__, message)
|
||||
#ifndef __func__
|
||||
#ifdef __FUNCTION__
|
||||
#define __func__ __FUNCTION__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
|
||||
|
||||
/**
|
||||
* Helper function, don't call this directly.
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue