verbose.cpp 305 B

123456789101112131415
  1. #include "verbose.h"
  2. // http://channel9.msdn.com/forums/techoff/254707-wrapping-printf-in-c/
  3. IGL_INLINE int igl::verbose(const char * msg,...)
  4. {
  5. #ifdef VERBOSE
  6. va_list argList;
  7. va_start(argList, msg);
  8. int count = vprintf(msg, argList);
  9. va_end(argList);
  10. return count;
  11. #else
  12. return 0;
  13. #endif
  14. }