fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / ardour / cycle_timer.h
index cab389ee692ecd56977a95075c9f541f56145475..54a2d1d8f2d27f47df119a55902e42828f721312 100644 (file)
@@ -42,7 +42,7 @@ class LIBARDOUR_API CycleTimer {
   public:
        CycleTimer(const std::string& name) {
 #ifndef NDEBUG
-               if (PBD::debug_bits & PBD::DEBUG::CycleTimers) {
+               if (DEBUG_ENABLED (PBD::DEBUG::CycleTimers)) {
                        _name = name;
                        if (cycles_per_usec == 0) {
                                cycles_per_usec = get_mhz ();
@@ -56,7 +56,7 @@ class LIBARDOUR_API CycleTimer {
 
        ~CycleTimer() {
 #ifndef NDEBUG
-               if (PBD::debug_bits & PBD::DEBUG::CycleTimers) {
+               if (DEBUG_ENABLED (PBD::DEBUG::CycleTimers)) {
                        _exit = get_cycles();
                        std::cerr << _name << ": " << (float) (_exit - _entry) / cycles_per_usec << " (" <<  _entry << ", " << _exit << ')' << std::endl;
                }
@@ -70,7 +70,9 @@ public:
        StoringTimer (int);
        void ref ();
        void check (int);
+#ifndef NDEBUG
        void dump (std::string const &);
+#endif
 
 private:
        cycles_t _current_ref;