From 5a9025123ef71bea56f8bcb80eb19ac3a0c6be33 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Mon, 14 Mar 2022 14:38:38 -0500 Subject: [PATCH] Force `EventHandlerResult` values to be a single byte (#1131) By specifying the type of the `EventHandlerResult` enum as `uint8_t`, it only takes up one byte instead of two, saving a significant amout of PROGMEM. Signed-off-by: Michael Richters --- src/kaleidoscope/event_handler_result.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kaleidoscope/event_handler_result.h b/src/kaleidoscope/event_handler_result.h index f22bffee..1cf05c75 100644 --- a/src/kaleidoscope/event_handler_result.h +++ b/src/kaleidoscope/event_handler_result.h @@ -1,5 +1,5 @@ /* Kaleidoscope - Firmware for computer input devices - * Copyright (C) 2013-2018 Keyboard.io, Inc. + * Copyright (C) 2013-2022 Keyboard.io, Inc. * * This program is free software: you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free Software @@ -16,6 +16,8 @@ #pragma once +#include + namespace kaleidoscope { // This is the set of return values for event handlers. Event handlers for @@ -41,7 +43,7 @@ namespace kaleidoscope { // further handlers. There is currently no specification for what should // happen if this is returned. -enum class EventHandlerResult { +enum class EventHandlerResult : uint8_t { OK, EVENT_CONSUMED, ABORT,