libtemporal: move DEBUG::Beats into correct location

This commit is contained in:
Paul Davis 2020-12-28 13:24:42 -07:00
parent f015c08dd9
commit e590598dcf
3 changed files with 4 additions and 9 deletions

View File

@ -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");

View File

@ -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<Temporal::Beats> {
@ -337,12 +332,10 @@ namespace std {
return Temporal::Beats(std::numeric_limits<int32_t>::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)

View File

@ -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;
}
}