From 571dfb90557e20f0f3b62288856eef68cc95ed1f Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 4 Jul 2009 11:26:57 +0000 Subject: (svn r16736) -Codechange: give some station enums a name and use that instead of 'byte'. --- src/core/enum_type.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/core') diff --git a/src/core/enum_type.hpp b/src/core/enum_type.hpp index 1560d42d6..8df7920d3 100644 --- a/src/core/enum_type.hpp +++ b/src/core/enum_type.hpp @@ -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 */ -- cgit v1.2.3-54-g00ecf