Remove ControlList::_max_xval which is set up and stored in
authorCarl Hetherington <carl@carlh.net>
Wed, 4 Apr 2012 00:15:41 +0000 (00:15 +0000)
committerCarl Hetherington <carl@carlh.net>
Wed, 4 Apr 2012 00:15:41 +0000 (00:15 +0000)
state but never actually read.

git-svn-id: svn://localhost/ardour2/branches/3.0@11787 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/audioregion.cc
libs/ardour/automation_list.cc
libs/evoral/evoral/ControlList.hpp
libs/evoral/src/ControlList.cpp

index 7e212630d53ac59ec89daecb2f9c53c5a5e492d1..2c63f1d40c41cb953ab8d7f290c9fbf86f5731f8 100644 (file)
@@ -668,7 +668,6 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
                                set_default_envelope ();
                        }
 
-                       _envelope->set_max_xval (_length);
                        _envelope->truncate_end (_length);
 
 
@@ -987,7 +986,6 @@ AudioRegion::recompute_at_end ()
 
        _envelope->freeze ();
        _envelope->truncate_end (_length);
-       _envelope->set_max_xval (_length);
        _envelope->thaw ();
 
        suspend_property_changes();
index 0810d2f2d007bb45c59eb8970d76e3048f6f5357..3c35dbb8fd14f3a2c13cdb4901ee7578e26284fe 100644 (file)
@@ -156,7 +156,6 @@ AutomationList::operator= (const AutomationList& other)
 
                _min_yval = other._min_yval;
                _max_yval = other._max_yval;
-               _max_xval = other._max_xval;
                _default_value = other._default_value;
 
                mark_dirty ();
@@ -278,8 +277,6 @@ AutomationList::state (bool full)
        root->add_property ("min-yval", buf);
        snprintf (buf, sizeof (buf), "%.12g", _max_yval);
        root->add_property ("max-yval", buf);
-       snprintf (buf, sizeof (buf), "%.12g", _max_xval);
-       root->add_property ("max-xval", buf);
 
        root->add_property ("interpolation-style", enum_2_string (_interpolation));
 
@@ -491,12 +488,6 @@ AutomationList::set_state (const XMLNode& node, int version)
                _max_yval = FLT_MAX;
        }
 
-       if ((prop = node.property (X_("max-xval"))) != 0) {
-               _max_xval = atof (prop->value ().c_str());
-       } else {
-               _max_xval = 0; // means "no limit ;
-       }
-
        bool have_events = false;
 
        for (niter = nlist.begin(); niter != nlist.end(); ++niter) {
index 286974676f87a741dcabde370aa6b890fe9b93fc..368717bb1f642fd5adf527bbb93d61637eec5bb6 100644 (file)
@@ -165,9 +165,6 @@ public:
                (obj.*method)(*this);
        }
 
-       void set_max_xval (double);
-       double get_max_xval() const { return _max_xval; }
-
        double eval (double where) {
                Glib::Mutex::Lock lm (_lock);
                return unlocked_eval (where);
@@ -272,7 +269,6 @@ protected:
        mutable Glib::Mutex   _lock;
        int8_t                _frozen;
        bool                  _changed_when_thawed;
-       double                _max_xval;
        double                _min_yval;
        double                _max_yval;
        double                _default_value;
index c31bd3421d4dc14a9ff8339779b474f328ea597e..59792f732f8e51d820121de1dd2e808f769288eb 100644 (file)
@@ -43,7 +43,6 @@ ControlList::ControlList (const Parameter& id)
        _changed_when_thawed = false;
        _min_yval = id.min();
        _max_yval = id.max();
-       _max_xval = 0; // means "no limit"
        _default_value = 0;
        _lookup_cache.left = -1;
        _lookup_cache.range.first = _events.end();
@@ -61,7 +60,6 @@ ControlList::ControlList (const ControlList& other)
        _changed_when_thawed = false;
        _min_yval = other._min_yval;
        _max_yval = other._max_yval;
-       _max_xval = other._max_xval;
        _default_value = other._default_value;
        _lookup_cache.range.first = _events.end();
        _search_cache.first = _events.end();
@@ -83,7 +81,6 @@ ControlList::ControlList (const ControlList& other, double start, double end)
        _changed_when_thawed = false;
        _min_yval = other._min_yval;
        _max_yval = other._max_yval;
-       _max_xval = other._max_xval;
        _default_value = other._default_value;
        _lookup_cache.range.first = _events.end();
        _search_cache.first = _events.end();
@@ -143,7 +140,6 @@ ControlList::operator= (const ControlList& other)
 
                _min_yval = other._min_yval;
                _max_yval = other._max_yval;
-               _max_xval = other._max_xval;
                _default_value = other._default_value;
 
                mark_dirty ();
@@ -723,12 +719,6 @@ ControlList::control_points_adjacent (double xval)
        return ret;
 }
 
-void
-ControlList::set_max_xval (double x)
-{
-       _max_xval = x;
-}
-
 void
 ControlList::freeze ()
 {