Fix issues in export with trim enabled
[ardour.git] / libs / audiographer / audiographer / debuggable.h
index 79e0f80dd30a5a8f11a1107fcfb75fdcb687aba2..6ca544a87e46d888ae314df8df848a9479fca703 100644 (file)
@@ -7,11 +7,13 @@
 
 #include <iostream>
 
+#include "audiographer/visibility.h"
+
 namespace AudioGrapher
 {
 
 /// Compile time defined debug level
-enum DebugLevel
+enum LIBAUDIOGRAPHER_API DebugLevel
 {
        DebugNone,     ///< Disabled
        DebugObject,   ///< Object level stuff, ctors, initalizers etc.
@@ -22,7 +24,7 @@ enum 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) {
@@ -36,19 +38,19 @@ enum DebugLevel
   * logical and (short-circuiting).
   */
 template<DebugLevel L = DEFAULT_DEBUG_LEVEL>
-class 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; }