From 58146b8f45d5a12571045f98d848acbf35e5f10c Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Wed, 30 Sep 2020 22:43:01 -0700 Subject: [PATCH] Let's try that again --- src/kaleidoscope/MatrixAddr.h | 6 +++--- src/kaleidoscope/bitfields.h | 2 +- src/kaleidoscope/key_defs.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/kaleidoscope/MatrixAddr.h b/src/kaleidoscope/MatrixAddr.h index f5aa07c7..78de9575 100644 --- a/src/kaleidoscope/MatrixAddr.h +++ b/src/kaleidoscope/MatrixAddr.h @@ -47,7 +47,7 @@ class MatrixAddr { constexpr MatrixAddr(uint8_t row, uint8_t col) : offset_(row * cols + col) {} - explicit constexpr MatrixAddr(uint8_t offset) + constexpr MatrixAddr(uint8_t offset) : offset_(offset) {} // Rely on the default copy and move constructor. @@ -57,8 +57,8 @@ class MatrixAddr { // ridiculously bad assembler code for each copy construction, // that would bloat the default firmware by 1K of PROGMEM! // - explicit constexpr MatrixAddr(const ThisType &other) = default; - explicit constexpr MatrixAddr(ThisType &&other) = default; + constexpr MatrixAddr(const ThisType &other) = default; + constexpr MatrixAddr(ThisType &&other) = default; //constexpr MatrixAddr(const ThisType &other) : offset_(other.offset_) {} //constexpr MatrixAddr(ThisType &&other) : offset_(other.offset_) {} diff --git a/src/kaleidoscope/bitfields.h b/src/kaleidoscope/bitfields.h index 52621143..3a59c854 100644 --- a/src/kaleidoscope/bitfields.h +++ b/src/kaleidoscope/bitfields.h @@ -113,7 +113,7 @@ class Bitfield : public internal::_BaseBitfield { static constexpr size_t n_bytes_ = nBytesForBits(BitCount__); template - explicit constexpr Bitfield(Bits__...bits) : bits_(bits...) { + constexpr Bitfield(Bits__...bits) : bits_(bits...) { static_assert(sizeof...(Bits__) == n_bits_, "Invalid number of bits supplied to Bitfield constructor. \n" "Compare the number of bits supplied with the provided template \n" diff --git a/src/kaleidoscope/key_defs.h b/src/kaleidoscope/key_defs.h index 8a7de806..cca19bf3 100644 --- a/src/kaleidoscope/key_defs.h +++ b/src/kaleidoscope/key_defs.h @@ -36,7 +36,7 @@ class Key { Key() = default; - explicit constexpr Key(uint16_t raw) + constexpr Key(uint16_t raw) : Key{(uint8_t)(raw & 0x00FF), (uint8_t)(raw >> 8)} {} @@ -140,7 +140,7 @@ class Key { DataProxy() = default; - explicit constexpr DataProxy(uint8_t value) : value_{value} {} + constexpr DataProxy(uint8_t value) : value_{value} {} DEPRECATED(DIRECT_KEY_MEMBER_ACCESS) DataProxy &operator=(uint8_t value) {