cpplint: Constructors where we want explicit conversion, should be explicit

Signed-off-by: Gergely Nagy <algernon@keyboard.io>
pull/911/head
Gergely Nagy 4 years ago
parent 24a1d38eb1
commit 577fb1c51d
No known key found for this signature in database
GPG Key ID: AC1E90BAC433F68F

@ -47,7 +47,7 @@ class MatrixAddr {
constexpr MatrixAddr(uint8_t row, uint8_t col) constexpr MatrixAddr(uint8_t row, uint8_t col)
: offset_(row * cols + col) {} : offset_(row * cols + col) {}
constexpr MatrixAddr(uint8_t offset) explicit constexpr MatrixAddr(uint8_t offset)
: offset_(offset) {} : offset_(offset) {}
// Rely on the default copy and move constructor. // Rely on the default copy and move constructor.

@ -113,7 +113,7 @@ class Bitfield : public internal::_BaseBitfield {
static constexpr size_t n_bytes_ = nBytesForBits(BitCount__); static constexpr size_t n_bytes_ = nBytesForBits(BitCount__);
template<typename ... Bits__> template<typename ... Bits__>
constexpr Bitfield(Bits__...bits) : bits_(bits...) { explicit constexpr Bitfield(Bits__...bits) : bits_(bits...) {
static_assert(sizeof...(Bits__) == n_bits_, static_assert(sizeof...(Bits__) == n_bits_,
"Invalid number of bits supplied to Bitfield<BitCount__> constructor. \n" "Invalid number of bits supplied to Bitfield<BitCount__> constructor. \n"
"Compare the number of bits supplied with the provided template \n" "Compare the number of bits supplied with the provided template \n"

Loading…
Cancel
Save