group: or original flags with additional flags

This commit is contained in:
itsmattkc
2022-01-22 17:15:56 -08:00
parent 4476a8d858
commit 42d744d624
3 changed files with 16 additions and 3 deletions
+13
View File
@@ -57,6 +57,19 @@ public:
return f_ & f;
}
InputFlags operator|(const InputFlags &f) const
{
InputFlags i = *this;
i |= f;
return i;
}
InputFlags &operator|=(const InputFlags &f)
{
f_ |= f.f_;
return *this;
}
private:
uint64_t f_;