From dfd9bff7bddce6ced0852964855e0f6f8852f170 Mon Sep 17 00:00:00 2001 From: Michael Richters Date: Fri, 25 Mar 2022 17:56:32 -0500 Subject: [PATCH] Add curly braces to make code clearer and satisfy cpplint Signed-off-by: Michael Richters --- .../device/virtual/DefaultHIDReportConsumer.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp index b90f854d..da23ddea 100644 --- a/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp +++ b/src/kaleidoscope/device/virtual/DefaultHIDReportConsumer.cpp @@ -63,11 +63,16 @@ void DefaultHIDReportConsumer::processHIDReport( std::stringstream keypresses; bool anything = false; - if (report_data.modifiers) anything = true; - else for (int i = 0; i < KEY_BYTES; i++) if (report_data.keys[i]) { + if (report_data.modifiers) { + anything = true; + } else { + for (int i = 0; i < KEY_BYTES; i++) { + if (report_data.keys[i]) { anything = true; break; } + } + } if (!anything) { keypresses << "none";