diff options
author | nick_m <mainsbridge@gmail.com> | 2015-10-03 23:55:26 +1000 |
---|---|---|
committer | nick_m <mainsbridge@gmail.com> | 2015-10-20 00:53:28 +1100 |
commit | cc7de475f2e9ea819de56fcb695ef098e29a7ead (patch) | |
tree | 4f0d848adc8e221b9b6ed57e643e04893a5dd22d /libs/evoral/src | |
parent | ff2f93497793545fbe6206e3d3c8cf559619d2a9 (diff) |
Amend last connit - don't use a bool to represent a double.
Diffstat (limited to 'libs/evoral/src')
-rw-r--r-- | libs/evoral/src/ControlList.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp index 6d07ff150a..c96bcc2d94 100644 --- a/libs/evoral/src/ControlList.cpp +++ b/libs/evoral/src/ControlList.cpp @@ -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)); |