X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Faudiographer%2Faudiographer%2Fdebuggable.h;h=6ca544a87e46d888ae314df8df848a9479fca703;hb=c1bd70d8b085acf3895303459cbe50d7dcdd95fe;hp=fc03d1e68defad29feb1598077417dcae51536a9;hpb=5792674ca4d02e093b4318d31a117a47ae72ecdf;p=ardour.git diff --git a/libs/audiographer/audiographer/debuggable.h b/libs/audiographer/audiographer/debuggable.h index fc03d1e68d..6ca544a87e 100644 --- a/libs/audiographer/audiographer/debuggable.h +++ b/libs/audiographer/audiographer/debuggable.h @@ -24,7 +24,7 @@ enum LIBAUDIOGRAPHER_API DebugLevel }; /** Class that allows optimizing out debugging code during compile time. - * Usage: to take all advantage of this class you should wrap all + * Usage: to take all advantage of this class you should wrap all * debugging statemets like this: * \code * if (debug_level (SomeDebugLevel) && other_optional_conditionals) { @@ -38,19 +38,19 @@ enum LIBAUDIOGRAPHER_API DebugLevel * logical and (short-circuiting). */ template -class LIBAUDIOGRAPHER_API Debuggable +class /*LIBAUDIOGRAPHER_API*/ Debuggable { protected: Debuggable(std::ostream & debug_stream = std::cerr) : stream (debug_stream) {} bool debug_level (DebugLevel level) { - #ifdef NDEBUG - level = DEFAULT_DEBUG_LEVEL; /* stop pedantic gcc complaints about unused parameter */ +#ifndef NDEBUG + (void) level; /* stop pedantic gcc complaints about unused parameter */ return false; - #else +#else return L >= level; - #endif +#endif } std::ostream & debug_stream() { return stream; }