refs #358, changes of MS' review

https://dev.vatsim-germany.org/issues/358#note-11
This commit is contained in:
Klaus Basan
2014-12-29 23:11:23 +01:00
parent 8fce90065d
commit 4f0bf6d62c
4 changed files with 52 additions and 28 deletions

View File

@@ -96,6 +96,7 @@ namespace BlackMisc
//! Compare with index given by enum
template<class EnumType> bool equalsPropertyIndexEnum(EnumType ev)
{
static_assert(std::is_enum<EnumType>::value, "Argument must be an enum");
if (this->m_indexes.size() != 1) { return false; }
return static_cast<int>(ev) == m_indexes.first();
}