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 <algernon@keyboard.io>
pull/365/head
Gergely Nagy 7 years ago
parent 2cdee29d60
commit fac99ec57b

@ -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 { namespace kaleidoscope {
class MagicCombo : public kaleidoscope::Plugin { class MagicCombo : public kaleidoscope::Plugin {
@ -50,10 +43,8 @@ class MagicCombo : public kaleidoscope::Plugin {
typedef struct combo_t { typedef struct combo_t {
uint32_t left_hand, right_hand; uint32_t left_hand, right_hand;
combo_t& operator=(combo_t &) { private:
static_assert(false, _DEPRECATE(_MAGICCOMBO_API_CHANGE)); combo_t(byte left, byte right) {}
return *this;
}
} combo_t; } combo_t;
MagicCombo(void) {} MagicCombo(void) {}

Loading…
Cancel
Save