From 52518eb94b00c8411f79a3fdad4de7a3d5b6cd77 Mon Sep 17 00:00:00 2001 From: Shriramana Sharma Date: Wed, 18 Jul 2018 07:26:52 +0530 Subject: [PATCH] OneShot: use default value to overload for cancel Instead of having two variants of cancel(), have only one with a default value for its argument. No functional change at all, but nicer code. --- src/kaleidoscope/plugin/OneShot.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/kaleidoscope/plugin/OneShot.h b/src/kaleidoscope/plugin/OneShot.h index dab36c8d..a8797d23 100644 --- a/src/kaleidoscope/plugin/OneShot.h +++ b/src/kaleidoscope/plugin/OneShot.h @@ -42,10 +42,7 @@ class OneShot : public kaleidoscope::Plugin { } static bool isActive(Key key); static bool isSticky(Key key); - static void cancel(bool with_stickies); - static void cancel(void) { - cancel(false); - } + static void cancel(bool with_stickies = false); static uint16_t time_out; static int16_t double_tap_time_out; static uint16_t hold_time_out;