summaryrefslogtreecommitdiff
path: root/libs/ardour/location.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-26 22:45:20 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-26 22:45:20 +0000
commit1f8d176c1380951246e83d14d408c7515ca8b7ca (patch)
tree282cb1e5217caced258318f770b5bcacf2aea1a9 /libs/ardour/location.cc
parentd5666aa2ec00a9e1668e35a92f7838c4162fee03 (diff)
Add lots of asserts to try to track down #3553.
git-svn-id: svn://localhost/ardour2/branches/3.0@8096 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/location.cc')
-rw-r--r--libs/ardour/location.cc34
1 files changed, 33 insertions, 1 deletions
diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc
index 7dce787b60..4f90b32282 100644
--- a/libs/ardour/location.cc
+++ b/libs/ardour/location.cc
@@ -50,7 +50,8 @@ Location::Location (Session& s)
, _locked (false)
, _position_lock_style (AudioTime)
{
-
+ assert (_start >= 0);
+ assert (_end >= 0);
}
Location::Location (Session& s, framepos_t sample_start, framepos_t sample_end, const std::string &name, Flags bits)
@@ -63,6 +64,9 @@ Location::Location (Session& s, framepos_t sample_start, framepos_t sample_end,
, _position_lock_style (AudioTime)
{
recompute_bbt_from_frames ();
+
+ assert (_start >= 0);
+ assert (_end >= 0);
}
Location::Location (const Location& other)
@@ -79,6 +83,9 @@ Location::Location (const Location& other)
/* copy is not locked even if original was */
_locked = false;
+
+ assert (_start >= 0);
+ assert (_end >= 0);
}
Location::Location (Session& s, const XMLNode& node)
@@ -92,6 +99,9 @@ Location::Location (Session& s, const XMLNode& node)
if (set_state (node, Stateful::loading_state_version)) {
throw failed_constructor ();
}
+
+ assert (_start >= 0);
+ assert (_end >= 0);
}
Location*
@@ -115,6 +125,9 @@ Location::operator= (const Location& other)
/* "changed" not emitted on purpose */
+ assert (_start >= 0);
+ assert (_end >= 0);
+
return this;
}
@@ -143,9 +156,14 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
if (allow_bbt_recompute) {
recompute_bbt_from_frames ();
}
+
start_changed (this); /* EMIT SIGNAL */
end_changed (this); /* EMIT SIGNAL */
}
+
+ assert (_start >= 0);
+ assert (_end >= 0);
+
return 0;
}
@@ -164,6 +182,8 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute)
}
}
+ assert (_start >= 0);
+
return 0;
}
@@ -195,6 +215,10 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
start_changed (this); /* EMIT SIGNAL */
end_changed (this); /* EMIT SIGNAL */
}
+
+ assert (_start >= 0);
+ assert (_end >= 0);
+
return 0;
}
@@ -212,6 +236,8 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute)
}
}
+ assert (_end >= 0);
+
return 0;
}
@@ -245,6 +271,9 @@ Location::move_to (framepos_t pos)
changed (this); /* EMIT SIGNAL */
}
+ assert (_start >= 0);
+ assert (_end >= 0);
+
return 0;
}
@@ -465,6 +494,9 @@ Location::set_state (const XMLNode& node, int /*version*/)
changed (this); /* EMIT SIGNAL */
+ assert (_start >= 0);
+ assert (_end >= 0);
+
return 0;
}