More tracing fixup

This commit is contained in:
Behdad Esfahbod 2012-11-23 16:49:19 -05:00
parent a1733db1c6
commit 2c9d6485a1
1 changed files with 2 additions and 3 deletions

View File

@ -720,7 +720,7 @@ struct hb_auto_trace_t {
if (plevel) --*plevel;
}
inline ret_t &ret (ret_t &v, unsigned int line = 0)
inline ret_t ret (ret_t v, unsigned int line = 0)
{
if (unlikely (returned)) {
fprintf (stderr, "OUCH, double calls to TRACE_RETURN. This is a bug, please report.\n");
@ -751,8 +751,7 @@ struct hb_auto_trace_t<0, ret_t> {
const char *message HB_UNUSED,
...) {}
template <typename T>
inline T ret (T v, unsigned int line = 0) { return v; }
inline ret_t ret (ret_t v, unsigned int line = 0) { return v; }
};
#define TRACE_RETURN(RET) trace.ret (RET, __LINE__)