buffer: move Buffer::Flags operator as friends defined inside Buffer
This commit is contained in:
parent
c6f08f6c34
commit
a2577b4180
|
@ -203,34 +203,34 @@ private:
|
|||
|
||||
OptionManager m_options;
|
||||
HookManager m_hooks;
|
||||
};
|
||||
|
||||
constexpr Buffer::Flags operator|(Buffer::Flags lhs, Buffer::Flags rhs)
|
||||
friend constexpr Flags operator|(Flags lhs, Flags rhs)
|
||||
{
|
||||
return (Buffer::Flags)((int) lhs | (int) rhs);
|
||||
return (Flags)((int) lhs | (int) rhs);
|
||||
}
|
||||
|
||||
inline Buffer::Flags& operator|=(Buffer::Flags& lhs, Buffer::Flags rhs)
|
||||
friend Flags& operator|=(Flags& lhs, Flags rhs)
|
||||
{
|
||||
(int&) lhs |= (int) rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
constexpr bool operator&(Buffer::Flags lhs, Buffer::Flags rhs)
|
||||
friend constexpr bool operator&(Flags lhs, Flags rhs)
|
||||
{
|
||||
return ((int) lhs & (int) rhs) != 0;
|
||||
}
|
||||
|
||||
inline Buffer::Flags& operator&=(Buffer::Flags& lhs, Buffer::Flags rhs)
|
||||
friend Flags& operator&=(Flags& lhs, Flags rhs)
|
||||
{
|
||||
(int&) lhs &= (int) rhs;
|
||||
return lhs;
|
||||
}
|
||||
|
||||
constexpr Buffer::Flags operator~(Buffer::Flags lhs)
|
||||
friend constexpr Flags operator~(Flags lhs)
|
||||
{
|
||||
return (Buffer::Flags)(~(int)lhs);
|
||||
return (Flags)(~(int)lhs);
|
||||
}
|
||||
};
|
||||
|
||||
struct BufferListenerRegisterFuncs
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user