Minor
This commit is contained in:
parent
6eec6f406d
commit
829e814ff3
|
@ -501,7 +501,7 @@ _hb_debug (unsigned int level,
|
|||
#define DEBUG_LEVEL(WHAT, LEVEL) (_hb_debug ((LEVEL), HB_DEBUG_##WHAT))
|
||||
#define DEBUG(WHAT) (DEBUG_LEVEL (WHAT, 0))
|
||||
|
||||
template <int max_level> inline bool /* always returns TRUE */
|
||||
template <int max_level> inline void
|
||||
_hb_debug_msg_va (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -512,7 +512,7 @@ _hb_debug_msg_va (const char *what,
|
|||
va_list ap)
|
||||
{
|
||||
if (!_hb_debug (level, max_level))
|
||||
return TRUE;
|
||||
return;
|
||||
|
||||
static const char bars[] = "││││││││││││││││││││││││││││││││││││││││";
|
||||
|
||||
|
@ -538,10 +538,8 @@ _hb_debug_msg_va (const char *what,
|
|||
vfprintf (stderr, message, ap);
|
||||
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
template <> inline bool /* always returns TRUE */
|
||||
template <> inline void
|
||||
_hb_debug_msg_va<0> (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -549,12 +547,9 @@ _hb_debug_msg_va<0> (const char *what,
|
|||
unsigned int level,
|
||||
int level_dir,
|
||||
const char *message,
|
||||
va_list ap)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
va_list ap) {}
|
||||
|
||||
template <int max_level> inline bool /* always returns TRUE */
|
||||
template <int max_level> inline void
|
||||
_hb_debug_msg (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -563,7 +558,7 @@ _hb_debug_msg (const char *what,
|
|||
int level_dir,
|
||||
const char *message,
|
||||
...) HB_PRINTF_FUNC(7, 8);
|
||||
template <int max_level> inline bool /* always returns TRUE */
|
||||
template <int max_level> inline void
|
||||
_hb_debug_msg (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -575,14 +570,10 @@ _hb_debug_msg (const char *what,
|
|||
{
|
||||
va_list ap;
|
||||
va_start (ap, message);
|
||||
|
||||
bool ret = _hb_debug_msg_va<max_level> (what, obj, func, indented, level, level_dir, message, ap);
|
||||
|
||||
_hb_debug_msg_va<max_level> (what, obj, func, indented, level, level_dir, message, ap);
|
||||
va_end (ap);
|
||||
|
||||
return ret;
|
||||
}
|
||||
template <> inline bool /* always returns TRUE */
|
||||
template <> inline void
|
||||
_hb_debug_msg<0> (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -591,7 +582,7 @@ _hb_debug_msg<0> (const char *what,
|
|||
int level_dir,
|
||||
const char *message,
|
||||
...) HB_PRINTF_FUNC(7, 8);
|
||||
template <> inline bool /* always returns TRUE */
|
||||
template <> inline void
|
||||
_hb_debug_msg<0> (const char *what,
|
||||
const void *obj,
|
||||
const char *func,
|
||||
|
@ -599,10 +590,7 @@ _hb_debug_msg<0> (const char *what,
|
|||
unsigned int level,
|
||||
int level_dir,
|
||||
const char *message,
|
||||
...)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
...) {}
|
||||
|
||||
#define DEBUG_MSG_LEVEL(WHAT, OBJ, LEVEL, LEVEL_DIR, ...) _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL, TRUE, (LEVEL), (LEVEL_DIR), __VA_ARGS__)
|
||||
#define DEBUG_MSG(WHAT, OBJ, ...) _hb_debug_msg<HB_DEBUG_##WHAT> (#WHAT, (OBJ), NULL, FALSE, 0, 0, __VA_ARGS__)
|
||||
|
|
Loading…
Reference in New Issue