13
0

add operator bool() to Evoral::Beats

This commit is contained in:
Paul Davis 2015-05-20 08:16:07 -04:00
parent 48fb3e3b48
commit 16c34acc88

View File

@ -191,6 +191,8 @@ public:
bool operator!() const { return _time == 0; } bool operator!() const { return _time == 0; }
operator bool() const { return _time != 0; }
static Beats min() { return Beats(DBL_MIN); } static Beats min() { return Beats(DBL_MIN); }
static Beats max() { return Beats(DBL_MAX); } static Beats max() { return Beats(DBL_MAX); }
static Beats tick() { return Beats(1.0 / PPQN); } static Beats tick() { return Beats(1.0 / PPQN); }