Selaa lähdekoodia

sdprintf: Avoid processing if not needed

Bryan Drewery 7 vuotta sitten
vanhempi
commit
fc35b930fa
1 muutettua tiedostoa jossa 4 lisäystä ja 0 poistoa
  1. 4 0
      src/debug.cc

+ 4 - 0
src/debug.cc

@@ -89,6 +89,10 @@ void sdprintf (const char *format, ...)
   char s[2001] = "";
   va_list va;
 
+#ifndef DEBUG
+  if (!sdebug)
+    return;
+#endif
   va_start(va, format);
   egg_vsnprintf(s, sizeof(s), format, va);
   va_end(va);