summaryrefslogtreecommitdiff
path: root/libs/surfaces/push2/track_mix.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2018-09-02 13:23:36 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2018-09-02 13:23:57 -0400
commit6e419a961e0b17227f4341880055c5690410607c (patch)
treee7dfe0d5ce26b2fd73b09521e61b76dd8069ad0e /libs/surfaces/push2/track_mix.cc
parent67f733bb9768e60fe7108613b3f9335675c7d08d (diff)
use boost::shared_ptr<> to manage Button/Pad lifetimes in Push2 code
Diffstat (limited to 'libs/surfaces/push2/track_mix.cc')
-rw-r--r--libs/surfaces/push2/track_mix.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/surfaces/push2/track_mix.cc b/libs/surfaces/push2/track_mix.cc
index 5c0b111ef9..fb5a5653f0 100644
--- a/libs/surfaces/push2/track_mix.cc
+++ b/libs/surfaces/push2/track_mix.cc
@@ -177,7 +177,7 @@ TrackMixLayout::show ()
Push2::Lower5, Push2::Lower6, Push2::Lower7, Push2::Lower8 };
for (size_t n = 0; n < sizeof (lower_buttons) / sizeof (lower_buttons[0]); ++n) {
- Push2::Button* b = p2.button_by_id (lower_buttons[n]);
+ boost::shared_ptr<Push2::Button> b = p2.button_by_id (lower_buttons[n]);
b->set_color (Push2::LED::DarkGray);
b->set_state (Push2::LED::OneShot24th);
p2.write (b->state_msg());
@@ -289,7 +289,7 @@ TrackMixLayout::simple_control_change (boost::shared_ptr<AutomationControl> ac,
return;
}
- Push2::Button* b = p2.button_by_id (bid);
+ boost::shared_ptr<Push2::Button> b = p2.button_by_id (bid);
if (!b) {
return;
@@ -311,7 +311,7 @@ TrackMixLayout::solo_mute_change ()
return;
}
- Push2::Button* b = p2.button_by_id (Push2::Lower2);
+ boost::shared_ptr<Push2::Button> b = p2.button_by_id (Push2::Lower2);
if (b) {
boost::shared_ptr<SoloControl> sc = stripable->solo_control();
@@ -402,8 +402,8 @@ TrackMixLayout::monitoring_change ()
return;
}
- Push2::Button* b1 = p2.button_by_id (Push2::Lower4);
- Push2::Button* b2 = p2.button_by_id (Push2::Lower5);
+ boost::shared_ptr<Push2::Button> b1 = p2.button_by_id (Push2::Lower4);
+ boost::shared_ptr<Push2::Button> b2 = p2.button_by_id (Push2::Lower5);
uint8_t b1_color;
uint8_t b2_color;