debug_printf_noop() was incorrectly defined as a function, which still has a runtime cost of argument evaluation.
This commit is contained in:
parent
f99c36aad2
commit
0fb8612ef5
|
@ -31,8 +31,7 @@
|
||||||
|
|
||||||
#define debug_printf_always(...) { fprintf(stdout, "%s %f ", g_network->getLocalAddress().toString().c_str(), now()), fprintf(stdout, __VA_ARGS__); fflush(stdout); }
|
#define debug_printf_always(...) { fprintf(stdout, "%s %f ", g_network->getLocalAddress().toString().c_str(), now()), fprintf(stdout, __VA_ARGS__); fflush(stdout); }
|
||||||
|
|
||||||
template <class... T>
|
#define debug_printf_noop(...)
|
||||||
void debug_printf_noop(T&&...) {}
|
|
||||||
|
|
||||||
#if REDWOOD_DEBUG
|
#if REDWOOD_DEBUG
|
||||||
#define debug_printf debug_printf_always
|
#define debug_printf debug_printf_always
|
||||||
|
|
Loading…
Reference in New Issue