Small improvement to QUKEYS() macro

Using braces really makes it much clearer. I stole the idea from @algernon.
pull/389/head
Michael Richters 7 years ago
parent 6e57b9868f
commit 8fcff0109f

@ -114,7 +114,8 @@ class Qukeys : public KaleidoscopePlugin {
extern kaleidoscope::Qukeys Qukeys; extern kaleidoscope::Qukeys Qukeys;
// macro for use in sketch file to simplify definition of qukeys // macro for use in sketch file to simplify definition of qukeys
#define QUKEYS(qukey_defs...) \ #define QUKEYS(qukey_defs...) { \
static kaleidoscope::Qukey qukeys[] = { qukey_defs }; \ static kaleidoscope::Qukey qukeys[] = { qukey_defs }; \
Qukeys.qukeys_ = qukeys; \ Qukeys.qukeys_ = qukeys; \
Qukeys.qukeys_count_ = sizeof(qukeys) / sizeof(kaleidoscope::Qukey); Qukeys.qukeys_count_ = sizeof(qukeys) / sizeof(kaleidoscope::Qukey); \
}

Loading…
Cancel
Save