MeshAgent
MeshAgent copied to clipboard
g_keymapLen improvement suggestion
In meshcore/KVM/Linux/linux_events.c:
19 static const int g_keymapLen = 96; // Modify this when you change anything in g_keymap.
23 static struct keymap_t g_keymap[] = {
This is needlessly error prone. Recommendation: move the declaration of g_keyMapLen down, write it like this:
static const size_t g_keymapLen = sizeof(g_keymap) / sizeof(g_keymap[0]);