diff --git a/libs/temporal/debug.cc b/libs/temporal/debug.cc index 121b1181ec..47138ccaf6 100644 --- a/libs/temporal/debug.cc +++ b/libs/temporal/debug.cc @@ -24,4 +24,5 @@ using namespace std; PBD::DebugBits PBD::DEBUG::TemporalMap = PBD::new_debug_bit ("TemporalMap"); PBD::DebugBits PBD::DEBUG::TemporalDomainConvert = PBD::new_debug_bit ("TemporalDomainConvert"); PBD::DebugBits PBD::DEBUG::SnapBBT = PBD::new_debug_bit ("SnapBBT"); +PBD::DebugBits PBD::DEBUG::Beats = PBD::new_debug_bit ("Beats"); diff --git a/libs/temporal/temporal/beats.h b/libs/temporal/temporal/beats.h index 39a4868f58..c090c77de5 100644 --- a/libs/temporal/temporal/beats.h +++ b/libs/temporal/temporal/beats.h @@ -301,6 +301,7 @@ class DoubleableBeats : public Beats double to_double() const { return (double)_beats + (_ticks / (double)PPQN); } }; + /* TIL, several horrible hours later, that sometimes the compiler looks in the namespace of a type (Temporal::Beats in this case) for an operator, and @@ -316,12 +317,6 @@ std::istream& operator>>(std::istream& istream, Temporal::Beats& b); } // namespace Temporal -namespace PBD { - namespace DEBUG { - LIBTEMPORAL_API extern uint64_t Beats; - } -} - namespace std { template<> struct numeric_limits { @@ -337,12 +332,10 @@ namespace std { return Temporal::Beats(std::numeric_limits::max(), Temporal::Beats::PPQN-1); } }; + } namespace PBD { - namespace DEBUG { - LIBTEMPORAL_API extern uint64_t Beats; - } template<> inline bool to_string (Temporal::Beats val, std::string & str) diff --git a/libs/temporal/temporal/debug.h b/libs/temporal/temporal/debug.h index 8988fdee6f..3538b95d49 100644 --- a/libs/temporal/temporal/debug.h +++ b/libs/temporal/temporal/debug.h @@ -28,6 +28,7 @@ namespace PBD { LIBTEMPORAL_API extern DebugBits TemporalDomainConvert; LIBTEMPORAL_API extern DebugBits TemporalMap; LIBTEMPORAL_API extern DebugBits SnapBBT; + LIBTEMPORAL_API extern DebugBits Beats; } }