Skip to content

Commit

Permalink
tweak flags types
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 22, 2022
1 parent 6f2fb43 commit 0782e3b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Marlin/src/core/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ 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); }
bool operator[](const int n) const { return test(n); }
const bool operator[](const int n) { return test(n); }
const bool operator[](const int n) const { return test(n); }
int size() const { return sizeof(b); }
};

Expand All @@ -113,8 +113,8 @@ 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; }
bool operator[](const int) const { return b; }
bool& operator[](const int) { return b; }
bool operator[](const int) const { return b; }
int size() const { return sizeof(b); }
};

Expand Down

0 comments on commit 0782e3b

Please sign in to comment.