Replace C-style typedefs with idiomatic C++ code

Signed-off-by: Michael Richters <gedankenexperimenter@gmail.com>
pull/1194/head
Michael Richters 2 years ago
parent 920be03cad
commit 2df20b1a5a
No known key found for this signature in database
GPG Key ID: 1288FD13E4EEF0C0

@ -62,10 +62,10 @@ constexpr Key LeaderKey(uint8_t n) {
class Leader : public kaleidoscope::Plugin {
public:
typedef void (*action_t)(uint8_t seq_index);
typedef struct {
struct dictionary_t {
Key sequence[LEADER_MAX_SEQUENCE_LENGTH + 1];
action_t action;
} dictionary_t;
};
const dictionary_t *dictionary;

@ -52,10 +52,10 @@ namespace plugin {
class MagicCombo : public kaleidoscope::Plugin {
public:
typedef void (*ComboAction)(uint8_t combo_index);
typedef struct {
struct Combo {
ComboAction action;
int8_t keys[MAX_COMBO_LENGTH + 1];
} Combo;
};
#ifndef NDEPRECATED
DEPRECATED(MAGICCOMBO_MIN_INTERVAL)

@ -27,9 +27,9 @@ namespace plugin {
class ShapeShifter : public kaleidoscope::Plugin {
public:
typedef struct {
struct dictionary_t {
Key original, replacement;
} dictionary_t;
};
const dictionary_t *dictionary = nullptr;

@ -35,11 +35,11 @@ namespace plugin {
class Syster : public kaleidoscope::Plugin {
public:
typedef enum {
enum action_t : uint8_t {
StartAction,
EndAction,
SymbolAction
} action_t;
};
void reset();

Loading…
Cancel
Save