(svn r16736) -Codechange: give some station enums a name and use that instead of 'byte'.

This commit is contained in:
rubidium
2009-07-04 11:26:57 +00:00
parent e56535fda5
commit c5a44ce99e
5 changed files with 28 additions and 8 deletions

View File

@@ -145,6 +145,20 @@ struct SimpleTinyEnumT {
this->m_val = (storage_type)u;
return *this;
}
/** Bit math (or) assignment operator (from enum_type) */
FORCEINLINE SimpleTinyEnumT &operator |= (enum_type e)
{
this->m_val = (storage_type)((enum_type)this->m_val | e);
return *this;
}
/** Bit math (and) assignment operator (from enum_type) */
FORCEINLINE SimpleTinyEnumT &operator &= (enum_type e)
{
this->m_val = (storage_type)((enum_type)this->m_val & e);
return *this;
}
};
#endif /* ENUM_TYPE_HPP */