Amend last connit - don't use a bool to represent a double.
authornick_m <mainsbridge@gmail.com>
Sat, 3 Oct 2015 13:55:26 +0000 (23:55 +1000)
committernick_m <mainsbridge@gmail.com>
Mon, 19 Oct 2015 13:53:28 +0000 (00:53 +1100)
libs/evoral/src/ControlList.cpp

index 6d07ff150afa91ae0c893ddf04a5cc7bf795ac80..c96bcc2d94a11f4971616cb6fa9bdec1b73bb58b 100644 (file)
@@ -585,9 +585,9 @@ ControlList::add (double when, double value, bool with_guards, bool with_initial
 
                        if (when >= 1) {
                                if (_desc.toggled) {
-                                       const bool bval = ((value >= 0.5) ? true : false);
-                                       _events.insert (_events.end(), new ControlEvent (0, !bval));
-                                       DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 added bool value %2 at zero\n", this, !bval));
+                                       const double opp_val = ((value < 0.5) ? 1.0 : 0.0);
+                                       _events.insert (_events.end(), new ControlEvent (0, opp_val));
+                                       DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 added bool value %2 at zero\n", this, opp_val));
 
                                } else {
                                        _events.insert (_events.end(), new ControlEvent (0, value));