Skip to content

Commit 95b6570

Browse files
committed
BitFlag Added "hasValue" function
1 parent 4ce5f6c commit 95b6570

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/nbl/core/util/bitflag.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ struct bitflag final
2727
inline bitflag<ENUM_TYPE>& operator|=(bitflag<ENUM_TYPE> rhs) { value = static_cast<ENUM_TYPE>(value | rhs.value); return *this; }
2828
inline bitflag<ENUM_TYPE>& operator&=(bitflag<ENUM_TYPE> rhs) { value = static_cast<ENUM_TYPE>(value & rhs.value); return *this; }
2929
inline bitflag<ENUM_TYPE>& operator^=(bitflag<ENUM_TYPE> rhs) { value = static_cast<ENUM_TYPE>(value ^ rhs.value); return *this; }
30+
inline bool hasValue(bitflag<ENUM_TYPE> val) const { return (value & val.value) != 0; }
3031
};
3132

3233
}

0 commit comments

Comments
 (0)