From e1c58aad6089d7eff31ab1b1e8d73aa1eb184c71 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Thu, 6 Sep 2018 19:28:45 +0200 Subject: [PATCH] Fix an invalid conversion from 'int' to non-scalar. --- libs/surfaces/launch_control_xl/controllers.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libs/surfaces/launch_control_xl/controllers.cc b/libs/surfaces/launch_control_xl/controllers.cc index b8a72272a3..dfdfa540d1 100644 --- a/libs/surfaces/launch_control_xl/controllers.cc +++ b/libs/surfaces/launch_control_xl/controllers.cc @@ -270,14 +270,11 @@ LaunchControlXL::track_button_by_range(uint8_t n, uint8_t first, uint8_t middle) b = nn_note_button_map.find (middle + n - 4); } - boost::shared_ptr button = 0; - if (b != nn_note_button_map.end()) { - button = boost::dynamic_pointer_cast (b->second); + return (b->second); } - return button; - + return boost::shared_ptr(); } void @@ -325,8 +322,6 @@ LaunchControlXL::button_track_focus(uint8_t n) } } - - boost::shared_ptr LaunchControlXL::get_ac_by_state(uint8_t n) { boost::shared_ptr ac;