summaryrefslogtreecommitdiff
path: root/libs/ardour/location.cc
diff options
context:
space:
mode:
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;
}