summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-16 19:37:46 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-16 19:37:46 +0000
commitfaefa809ad37e5e4c9e729dd52723c7a15aa7237 (patch)
tree68e8cbca4c52dd9b5cd020659d3a5440bb7ef563 /libs
parentc9b121803c3ad85c2dbb160f67a630e262bcedf5 (diff)
Remove unused full parameter to Region::state
git-svn-id: svn://localhost/ardour2/branches/3.0@7428 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/ardour/audioregion.h2
-rw-r--r--libs/ardour/ardour/midi_region.h2
-rw-r--r--libs/ardour/ardour/region.h2
-rw-r--r--libs/ardour/audioregion.cc43
-rw-r--r--libs/ardour/midi_region.cc4
-rw-r--r--libs/ardour/region.cc6
-rw-r--r--libs/ardour/session_state.cc2
7 files changed, 27 insertions, 34 deletions
diff --git a/libs/ardour/ardour/audioregion.h b/libs/ardour/ardour/audioregion.h
index 6a91790e97..d1238cb43c 100644
--- a/libs/ardour/ardour/audioregion.h
+++ b/libs/ardour/ardour/audioregion.h
@@ -121,7 +121,7 @@ class AudioRegion : public Region
virtual framecnt_t read_raw_internal (Sample*, framepos_t, framecnt_t, int channel) const;
- XMLNode& state (bool);
+ XMLNode& state ();
int set_state (const XMLNode&, int version);
static void set_default_fade (float steepness, framecnt_t len);
diff --git a/libs/ardour/ardour/midi_region.h b/libs/ardour/ardour/midi_region.h
index ac65b86fc3..0b62809fc3 100644
--- a/libs/ardour/ardour/midi_region.h
+++ b/libs/ardour/ardour/midi_region.h
@@ -71,7 +71,7 @@ class MidiRegion : public Region
uint32_t chan_n = 0,
NoteMode mode = Sustained) const;
- XMLNode& state (bool);
+ XMLNode& state ();
int set_state (const XMLNode&, int version);
int separate_by_channel (ARDOUR::Session&, std::vector< boost::shared_ptr<Region> >&) const;
diff --git a/libs/ardour/ardour/region.h b/libs/ardour/ardour/region.h
index 3dab0f46de..089ca97eb2 100644
--- a/libs/ardour/ardour/region.h
+++ b/libs/ardour/ardour/region.h
@@ -236,7 +236,7 @@ class Region
/* serialization */
XMLNode& get_state ();
- virtual XMLNode& state (bool);
+ virtual XMLNode& state ();
virtual int set_state (const XMLNode&, int version);
virtual boost::shared_ptr<Region> get_parent() const;
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc
index 5f8b35256b..6f349fed05 100644
--- a/libs/ardour/audioregion.cc
+++ b/libs/ardour/audioregion.cc
@@ -517,9 +517,9 @@ AudioRegion::_read_at (const SourceList& /*srcs*/, framecnt_t limit,
}
XMLNode&
-AudioRegion::state (bool full)
+AudioRegion::state ()
{
- XMLNode& node (Region::state (full));
+ XMLNode& node (Region::state ());
XMLNode *child;
char buf[64];
LocaleGuard lg (X_("POSIX"));
@@ -527,34 +527,27 @@ AudioRegion::state (bool full)
snprintf (buf, sizeof (buf), "%u", (uint32_t) _sources.size());
node.add_property ("channels", buf);
- if (full) {
- Stateful::add_properties (node);
- }
+ Stateful::add_properties (node);
child = node.add_child ("Envelope");
- if (full) {
- bool default_env = false;
-
- // If there are only two points, the points are in the start of the region and the end of the region
- // so, if they are both at 1.0f, that means the default region.
-
- if (_envelope->size() == 2 &&
- _envelope->front()->value == 1.0f &&
- _envelope->back()->value==1.0f) {
- if (_envelope->front()->when == 0 && _envelope->back()->when == _length) {
- default_env = true;
- }
- }
-
- if (default_env) {
- child->add_property ("default", "yes");
- } else {
- child->add_child_nocopy (_envelope->get_state ());
+ bool default_env = false;
+
+ // If there are only two points, the points are in the start of the region and the end of the region
+ // so, if they are both at 1.0f, that means the default region.
+
+ if (_envelope->size() == 2 &&
+ _envelope->front()->value == 1.0f &&
+ _envelope->back()->value==1.0f) {
+ if (_envelope->front()->when == 0 && _envelope->back()->when == _length) {
+ default_env = true;
}
-
- } else {
+ }
+
+ if (default_env) {
child->add_property ("default", "yes");
+ } else {
+ child->add_child_nocopy (_envelope->get_state ());
}
return node;
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc
index c65758b01e..c76b6a859e 100644
--- a/libs/ardour/midi_region.cc
+++ b/libs/ardour/midi_region.cc
@@ -195,9 +195,9 @@ MidiRegion::_read_at (const SourceList& /*srcs*/, Evoral::EventSink<nframes_t>&
}
XMLNode&
-MidiRegion::state (bool full)
+MidiRegion::state ()
{
- return Region::state (full);
+ return Region::state ();
}
int
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index a4de9fc8b7..6dc090ce3c 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -1140,7 +1140,7 @@ Region::set_layer (layer_t l)
}
XMLNode&
-Region::state (bool full)
+Region::state ()
{
XMLNode *node = new XMLNode ("Region");
char buf[64];
@@ -1191,7 +1191,7 @@ Region::state (bool full)
node->add_property (buf2, buf);
}
- if (full && _extra_xml) {
+ if (_extra_xml) {
node->add_child_copy (*_extra_xml);
}
@@ -1201,7 +1201,7 @@ Region::state (bool full)
XMLNode&
Region::get_state ()
{
- return state (true);
+ return state ();
}
int
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 8bb3fa1ff0..8ad239280c 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -1082,7 +1082,7 @@ Session::state(bool full_state)
boost::shared_ptr<Region> r = i->second;
/* only store regions not attached to playlists */
if (r->playlist() == 0) {
- child->add_child_nocopy (r->state (true));
+ child->add_child_nocopy (r->state ());
}
}
}