From 8ae349b49e16064e4d84b6cfd256e3ca7fb0cd60 Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 10 Oct 2011 20:31:41 -0700 Subject: Adding the 'stats' call to Input. Also fixing a bug with the Printer - va_args are vicious. --- includes/Printer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'includes/Printer.h') diff --git a/includes/Printer.h b/includes/Printer.h index 20b3b6c..d8ba9cf 100644 --- a/includes/Printer.h +++ b/includes/Printer.h @@ -31,12 +31,12 @@ class Printer { void setLocal(); static Printer * getPrinter(); - static void log(uint32_t level, const String & fmt, ...) { va_list ap; va_start(ap, fmt); log(level, fmt.to_charp(), ap); va_end(ap); } - static void log(uint32_t level, const char * fmt, ...) { va_list ap; va_start(ap, fmt); log(level, fmt, ap); va_end(ap); } - static void log(uint32_t level, const char * fmt, va_list ap) { getPrinter()->_log(level, fmt, ap); } - static void print(const String & fmt, ...) { va_list ap; va_start(ap, fmt); print(fmt.to_charp(), ap); va_end(ap); } - static void print(const char * fmt, ...) { va_list ap; va_start(ap, fmt); print(fmt, ap); va_end(ap); } - static void print(const char * fmt, va_list ap) { getPrinter()->_print(fmt, ap); } + static void log(uint32_t level, const String & fmt, ...) { va_list ap; va_start(ap, fmt); vlog(level, fmt.to_charp(), ap); va_end(ap); } + static void log(uint32_t level, const char * fmt, ...) { va_list ap; va_start(ap, fmt); vlog(level, fmt, ap); va_end(ap); } + static void vlog(uint32_t level, const char * fmt, va_list ap) { getPrinter()->_log(level, fmt, ap); } + static void print(const String & fmt, ...) { va_list ap; va_start(ap, fmt); vprint(fmt.to_charp(), ap); va_end(ap); } + static void print(const char * fmt, ...) { va_list ap; va_start(ap, fmt); vprint(fmt, ap); va_end(ap); } + static void vprint(const char * fmt, va_list ap) { getPrinter()->_print(fmt, ap); } static void enable(uint32_t levels = M_ALL) { getPrinter()->m_verbosity |= levels; } static void disable(uint32_t levels = M_ALL) { getPrinter()->m_verbosity &= ~levels; } -- cgit v1.2.3