Use the newest Ranges APIs

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 6839c3ca36
commit 853712eec1

@ -20,8 +20,6 @@
namespace kaleidoscope {
namespace Ranges = KaleidoscopePlugins::Ranges;
// --- state ---
Key Leader::sequence_[LEADER_MAX_SEQUENCE_LENGTH + 1];
uint8_t Leader::sequence_pos_;
@ -34,7 +32,7 @@ const Leader::dictionary_t *Leader::dictionary;
#define PARTIAL_MATCH -1
#define NO_MATCH -2
#define isLeader(k) (k.raw >= Ranges::LEAD_FIRST && k.raw <= Ranges::LEAD_LAST)
#define isLeader(k) (k.raw >= ranges::LEAD_FIRST && k.raw <= ranges::LEAD_LAST)
#define isActive() (sequence_[0].raw != Key_NoKey.raw)
// --- actions ---

@ -23,7 +23,7 @@
#define LEADER_MAX_SEQUENCE_LENGTH 4
#define LEAD(n) (Key) { .raw = KaleidoscopePlugins::Ranges::LEAD_FIRST + n }
#define LEAD(n) (Key) { .raw = kaleidoscope::ranges::LEAD_FIRST + n }
#define LEADER_SEQ(...) { __VA_ARGS__, Key_NoKey }
#define LEADER_DICT(...) { __VA_ARGS__, {{Key_NoKey}, NULL} }

Loading…
Cancel
Save