From 613f926c354f7d03a21cdd35392fe4f584a3ff86 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Thu, 22 Jun 2023 14:16:48 -0400 Subject: [PATCH] Change `side` argument from bool to uint8_t in Module::getExpander() and Module::ExpanderChangeEvent. --- include/engine/Module.hpp | 6 +++--- src/engine/Engine.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/engine/Module.hpp b/include/engine/Module.hpp index 6f6107e9..966e3f13 100644 --- a/include/engine/Module.hpp +++ b/include/engine/Module.hpp @@ -309,7 +309,7 @@ struct Module { return rightExpander; } /** Returns the left Expander for `side = 0` and the right Expander for `side = 1`. */ - Expander& getExpander(int side) { + Expander& getExpander(uint8_t side) { return side ? rightExpander : leftExpander; } @@ -420,8 +420,8 @@ struct Module { } struct ExpanderChangeEvent { - /** False for left, true for right. */ - bool side; + /** 0 for left, 1 for right. */ + uint8_t side; }; /** Called after an expander is added, removed, or changed on either the left or right side of the Module. */ diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp index 277b01a1..89566bd2 100644 --- a/src/engine/Engine.cpp +++ b/src/engine/Engine.cpp @@ -244,7 +244,7 @@ struct Engine::Internal { }; -static void Engine_updateExpander_NoLock(Engine* that, Module* module, bool side) { +static void Engine_updateExpander_NoLock(Engine* that, Module* module, uint8_t side) { Module::Expander& expander = side ? module->rightExpander : module->leftExpander; Module* oldExpanderModule = expander.module;