From fac99ec57b00ffbeba3737dbc82864a56996fef0 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 17 Jun 2018 08:19:48 +0200 Subject: [PATCH] Fix the error reporting on old-style API Unfortunately, the way we reported the use of an old-style API also triggered when not using it. Change that to only trigger when we DO use the old API, by marking the `combo_t` constructor private. Unfortunately, this does not allow us to use a custom error message. Signed-off-by: Gergely Nagy --- src/Kaleidoscope/MagicCombo.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Kaleidoscope/MagicCombo.h b/src/Kaleidoscope/MagicCombo.h index 902fe84e..958f7695 100644 --- a/src/Kaleidoscope/MagicCombo.h +++ b/src/Kaleidoscope/MagicCombo.h @@ -31,13 +31,6 @@ } \ } -#define _MAGICCOMBO_API_CHANGE \ - "The MagicCombo API changed in an incompatible way, you will need to\n" \ - "upgrade.\n" \ - "\n" \ - "Please see the `UPGRADING.md` document shipped with the source:\n" \ - " https://github.com/keyboardio/Kaleidoscope-MagicCombo/blob/master/UPGRADING.md" - namespace kaleidoscope { class MagicCombo : public kaleidoscope::Plugin { @@ -50,10 +43,8 @@ class MagicCombo : public kaleidoscope::Plugin { typedef struct combo_t { uint32_t left_hand, right_hand; - combo_t& operator=(combo_t &) { - static_assert(false, _DEPRECATE(_MAGICCOMBO_API_CHANGE)); - return *this; - } + private: + combo_t(byte left, byte right) {} } combo_t; MagicCombo(void) {}