From ab535fc039f1bb65a56c2bdc4d2f9ca08e5624d7 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 1 Oct 2020 10:16:44 +0200 Subject: [PATCH] cpplint: Ignore some false-positives for variable-sized arrays All of these places use a template argument (usually indirectly) for array sizes, so they are _not_ variable sized. It just so happens that cpplint is unable to figure that out on its own. For this reason, mark them explicitly, and let cpplint ignore these false positives. Signed-off-by: Gergely Nagy --- src/kaleidoscope/device/virtual/Virtual.h | 8 ++++---- src/kaleidoscope/driver/led/WS2812.h | 2 +- src/kaleidoscope/plugin/Qukeys/KeyAddrEventQueue.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kaleidoscope/device/virtual/Virtual.h b/src/kaleidoscope/device/virtual/Virtual.h index 0170d404..5d235f1b 100644 --- a/src/kaleidoscope/device/virtual/Virtual.h +++ b/src/kaleidoscope/device/virtual/Virtual.h @@ -86,10 +86,10 @@ class VirtualKeyScanner bool read_matrix_enabled_; - KeyState keystates_[matrix_rows * matrix_columns]; - KeyState keystates_prev_[matrix_rows * matrix_columns]; + KeyState keystates_[matrix_rows * matrix_columns]; // NOLINT(runtime/arrays) + KeyState keystates_prev_[matrix_rows * matrix_columns]; // NOLINT(runtime/arrays) - bool mask_[matrix_rows * matrix_columns]; + bool mask_[matrix_rows * matrix_columns]; // NOLINT(runtime/arrays) }; class VirtualLEDDriver @@ -108,7 +108,7 @@ class VirtualLEDDriver private: - cRGB led_states_[led_count]; + cRGB led_states_[led_count]; // NOLINT(runtime/arrays) }; // This overrides only the drivers and keeps the driver props of diff --git a/src/kaleidoscope/driver/led/WS2812.h b/src/kaleidoscope/driver/led/WS2812.h index 0b041d69..3a006d04 100644 --- a/src/kaleidoscope/driver/led/WS2812.h +++ b/src/kaleidoscope/driver/led/WS2812.h @@ -80,7 +80,7 @@ class WS2812 { } private: - Color leds_[ledCount]; + Color leds_[ledCount]; // NOLINT(runtime/arrays) uint8_t pinmask_; bool modified_ = false; diff --git a/src/kaleidoscope/plugin/Qukeys/KeyAddrEventQueue.h b/src/kaleidoscope/plugin/Qukeys/KeyAddrEventQueue.h index 750ce2cd..ce8114d4 100644 --- a/src/kaleidoscope/plugin/Qukeys/KeyAddrEventQueue.h +++ b/src/kaleidoscope/plugin/Qukeys/KeyAddrEventQueue.h @@ -45,7 +45,7 @@ class KeyAddrEventQueue { private: uint8_t length_{0}; KeyAddr addrs_[_capacity]; - _Timestamp timestamps_[_capacity]; + _Timestamp timestamps_[_capacity]; // NOLINT(runtime/arrays) _Bitfield release_event_bits_; public: