summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-10-06 20:18:02 +0200
committerRobin Gareus <robin@gareus.org>2015-10-06 20:18:02 +0200
commit2237389112b96bef5b54d4b8c1eff699cabe787a (patch)
treef66372317eaf510b2e1bbb83daac591754b5e766
parente78f0fe52655261a61d7239a89625076a4b65b06 (diff)
renice code. RAII rocks.
-rw-r--r--libs/ardour/route.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 7f21a6fdc3..b3444e0b90 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -34,6 +34,7 @@
#include "pbd/stacktrace.h"
#include "pbd/convert.h"
#include "pbd/boost_debug.h"
+#include "pbd/unwind.h"
#include "ardour/amp.h"
#include "ardour/audio_buffer.h"
@@ -820,7 +821,6 @@ Route::clear_all_solo_state ()
{
// ideally this function will never do anything, it only exists to forestall Murphy
bool emit_changed = false;
- bool old_safe = _solo_safe;
#ifndef NDEBUG
// these are really debug messages, but of possible interest.
@@ -841,9 +841,10 @@ Route::clear_all_solo_state ()
_soloed_by_others_upstream = 0;
_soloed_by_others_downstream = 0;
- _solo_safe = false; // allow set_solo() to do its job;
- set_solo (false, this);
- _solo_safe = old_safe;
+ {
+ PBD::Unwinder<bool> uw (_solo_safe, false);
+ set_solo (false, this);
+ }
if (emit_changed) {
set_mute_master_solo ();