diff options
author | Carl Hetherington <carl@carlh.net> | 2011-04-23 00:02:58 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-04-23 00:02:58 +0000 |
commit | 1d5cc25d94650f5e2e656ce7cd24ae5fea2ae6fc (patch) | |
tree | 3860e52b2570fac68e4167faf631d6a4060fcfd4 /libs/timecode | |
parent | a7a6bd1256c991f78d30d5707eb61691277d0687 (diff) |
Add some assertions.
git-svn-id: svn://localhost/ardour2/branches/3.0@9411 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/timecode')
-rw-r--r-- | libs/timecode/src/bbt_time.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libs/timecode/src/bbt_time.cc b/libs/timecode/src/bbt_time.cc index 2ece391786..c48191abe8 100644 --- a/libs/timecode/src/bbt_time.cc +++ b/libs/timecode/src/bbt_time.cc @@ -17,6 +17,7 @@ */ #include <cmath> +#include <cassert> #include "timecode/bbt_time.h" @@ -31,6 +32,8 @@ BBT_Time::BBT_Time (double dbeats) always be zero. */ + assert (dbeats >= 0); + bars = 0; beats = rint (floor (dbeats)); ticks = rint (floor (BBT_Time::ticks_per_beat * fmod (dbeats, 1.0))); |