PSP: Cleanup trace.h a bit

svn-id: r48802
This commit is contained in:
Max Horn 2010-04-26 10:28:38 +00:00
parent 4decff1a92
commit 516fd1dc76

View file

@ -44,8 +44,6 @@ void PSPDebugTrace(bool alsoToScreen, const char *format, ...);
extern int psp_debug_indent; extern int psp_debug_indent;
#endif #endif
#endif /* TRACE_H */
// From here on, we allow multiple definitions // From here on, we allow multiple definitions
#undef __PSP_PRINT__ #undef __PSP_PRINT__
#undef PSP_ERROR #undef PSP_ERROR
@ -109,13 +107,14 @@ class PSPStackDebugFuncs {
public: public:
PSPStackDebugFuncs(const char *name) : _name(name) { PSPStackDebugFuncs(const char *name) : _name(name) {
PSP_INFO_PRINT_INDENT("++ %s\n", _name.c_str()); \ PSP_INFO_PRINT_INDENT("++ %s\n", _name.c_str());
psp_debug_indent++; psp_debug_indent++;
} }
~PSPStackDebugFuncs() { ~PSPStackDebugFuncs() {
psp_debug_indent--; \ psp_debug_indent--;
if (psp_debug_indent < 0) PSP_ERROR("debug indent < 0\n"); \ if (psp_debug_indent < 0)
PSP_ERROR("debug indent < 0\n");
PSP_INFO_PRINT_INDENT("-- %s\n", _name.c_str()); PSP_INFO_PRINT_INDENT("-- %s\n", _name.c_str());
} }
}; };
@ -131,3 +130,5 @@ public:
#undef __PSP_PRINT_TO_FILE_AND_SCREEN__ #undef __PSP_PRINT_TO_FILE_AND_SCREEN__
#undef __PSP_DEBUG_FUNCS__ #undef __PSP_DEBUG_FUNCS__
#undef __PSP_DEBUG_PRINT__ #undef __PSP_DEBUG_PRINT__
#endif /* TRACE_H */