Typo fix and revert formatting on untouched file

This commit is contained in:
fauxpark 2023-10-14 22:33:54 +11:00
parent 5d3f783c12
commit f3132549d8
2 changed files with 5 additions and 6 deletions

View File

@ -19,21 +19,20 @@
#include <ostream>
#include "gmock/gmock.h"
bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs);
bool operator==(const report_keyboard_t& lhs, const report_keyboard_t& rhs);
std::ostream& operator<<(std::ostream& stream, const report_keyboard_t& value);
class KeyboardReportMatcher : public testing::MatcherInterface<report_keyboard_t&> {
public:
public:
KeyboardReportMatcher(const std::vector<uint8_t>& keys);
virtual bool MatchAndExplain(report_keyboard_t& report, testing::MatchResultListener* listener) const override;
virtual void DescribeTo(::std::ostream* os) const override;
virtual void DescribeNegationTo(::std::ostream* os) const override;
private:
private:
report_keyboard_t m_report;
};
template <typename... Ts>
template<typename... Ts>
inline testing::Matcher<report_keyboard_t&> KeyboardReport(Ts... keys) {
return testing::MakeMatcher(new KeyboardReportMatcher(std::vector<uint8_t>({keys...})));
}

View File

@ -97,7 +97,7 @@ bool is_key_pressed(uint8_t key) {
}
}
#endif
for (int i = 0; i < NKRO_REPORT_BITS; i++) {
for (int i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
if (keyboard_report->keys[i] == key) {
return true;
}