Skip to content
Snippets Groups Projects
Commit e98d3684 authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee Committed by Guillaume Roguez
Browse files

utils: Make most FlagPack methods const

Refs #74376

Change-Id: I869e3afd01a9aeab1ce5ce80f17eb71147875883
parent 60bb9782
No related branches found
No related tags found
No related merge requests found
...@@ -88,11 +88,11 @@ public: ...@@ -88,11 +88,11 @@ public:
return *this; return *this;
} }
FlagPack<T> operator&(const T& other) { FlagPack<T> operator&(const T& other) const {
return FlagPack<T>(m_Flags & static_cast<int>(other)); return FlagPack<T>(m_Flags & static_cast<int>(other));
} }
FlagPack<T> operator&(const FlagPack<T>& other) { FlagPack<T> operator&(const FlagPack<T>& other) const {
return FlagPack<T>(m_Flags & other.m_Flags); return FlagPack<T>(m_Flags & other.m_Flags);
} }
...@@ -101,23 +101,23 @@ public: ...@@ -101,23 +101,23 @@ public:
return *this; return *this;
} }
bool operator!=(const T& other) { bool operator!=(const T& other) const {
return m_Flags != static_cast<int>(other); return m_Flags != static_cast<int>(other);
} }
bool operator==(const T& other) { bool operator==(const T& other) const {
return m_Flags == static_cast<int>(other); return m_Flags == static_cast<int>(other);
} }
bool operator==(const FlagPack<T>& other) { bool operator==(const FlagPack<T>& other) const {
return m_Flags == other.m_Flags; return m_Flags == other.m_Flags;
} }
bool operator!() { bool operator!() const {
return !m_Flags; return !m_Flags;
} }
operator bool() { operator bool() const {
return m_Flags != 0; return m_Flags != 0;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment