🚨 Fix some compiler warnings
This commit is contained in:
committed by
Scott Lahteine
parent
f7bea2846f
commit
494a2fc80c
@ -43,7 +43,9 @@ public:
|
||||
}
|
||||
|
||||
constexpr SerialMask(const uint8_t mask) : mask(mask) {}
|
||||
constexpr SerialMask(const SerialMask & other) : mask(other.mask) {} // Can't use = default here since not all framework support this
|
||||
constexpr SerialMask(const SerialMask &rs) : mask(rs.mask) {} // Can't use = default here since not all frameworks support this
|
||||
|
||||
SerialMask& operator=(const SerialMask &rs) { mask = rs.mask; return *this; }
|
||||
|
||||
static constexpr uint8_t All = 0xFF;
|
||||
};
|
||||
|
@ -91,9 +91,9 @@ struct Flags {
|
||||
void set(const int n) { b |= (bits_t)_BV(n); }
|
||||
void clear(const int n) { b &= ~(bits_t)_BV(n); }
|
||||
bool test(const int n) const { return TEST(b, n); }
|
||||
bool operator[](const int n) { return test(n); }
|
||||
const bool operator[](const int n) const { return test(n); }
|
||||
const int size() const { return sizeof(b); }
|
||||
bool operator[](const int n) { return test(n); }
|
||||
bool operator[](const int n) const { return test(n); }
|
||||
int size() const { return sizeof(b); }
|
||||
};
|
||||
|
||||
// Specialization for a single bool flag
|
||||
@ -105,9 +105,9 @@ struct Flags<1> {
|
||||
void set(const int) { b = true; }
|
||||
void clear(const int) { b = false; }
|
||||
bool test(const int) const { return b; }
|
||||
bool operator[](const int) { return b; }
|
||||
const bool operator[](const int) const { return b; }
|
||||
const int size() const { return sizeof(b); }
|
||||
bool operator[](const int) { return b; }
|
||||
bool operator[](const int) const { return b; }
|
||||
int size() const { return sizeof(b); }
|
||||
};
|
||||
|
||||
typedef Flags<8> flags_8_t;
|
||||
@ -124,9 +124,9 @@ typedef struct AxisFlags {
|
||||
void set(const int n, const bool onoff) { flags.set(n, onoff); }
|
||||
void clear(const int n) { flags.clear(n); }
|
||||
bool test(const int n) const { return flags.test(n); }
|
||||
bool operator[](const int n) { return flags[n]; }
|
||||
const bool operator[](const int n) const { return flags[n]; }
|
||||
const int size() const { return sizeof(flags); }
|
||||
bool operator[](const int n) { return flags[n]; }
|
||||
bool operator[](const int n) const { return flags[n]; }
|
||||
int size() const { return sizeof(flags); }
|
||||
} axis_flags_t;
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user