From bd1110f444003d27bac95a1481869c6683cfd2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 1 Dec 2017 20:08:48 -0200 Subject: [PATCH] AP_JSButton: simplifies logic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Less code make people happy Signed-off-by: Patrick José Pereira --- libraries/AP_JSButton/AP_JSButton.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/AP_JSButton/AP_JSButton.cpp b/libraries/AP_JSButton/AP_JSButton.cpp index c019c26ee2..243c66b889 100644 --- a/libraries/AP_JSButton/AP_JSButton.cpp +++ b/libraries/AP_JSButton/AP_JSButton.cpp @@ -28,9 +28,8 @@ uint8_t JSButton::function(bool shift) const { if (shift) { return _sfunction; - } else { - return _function; } + return _function; } void JSButton::set_default(button_function_t f, button_function_t sf)