X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=formatter.hpp;h=181e2d1539d5c14bc14e070db1325a31d2593ad4;hb=dc792082bcdd4b761af6b22e67570098ebf9f3f2;hp=040d06d49084feafa191c8232ad708dea3d1e3bb;hpb=0ad49cbe3446dfe8404516852c904b40cf909c7c;p=apitrace diff --git a/formatter.hpp b/formatter.hpp index 040d06d..181e2d1 100644 --- a/formatter.hpp +++ b/formatter.hpp @@ -155,12 +155,16 @@ public: #endif -inline Formatter *defaultFormatter(void) { +inline Formatter *defaultFormatter(bool color = true) { + if (color) { #ifdef _WIN32 - return new WindowsFormatter; + return new WindowsFormatter; #else - return new AnsiFormatter; + return new AnsiFormatter; #endif + } else { + return new Formatter; + } }