clear bit
This commit is contained in:
@@ -30,6 +30,11 @@ template <typename T>
|
||||
inline void set_bit(T &val, const std::size_t &bit) {
|
||||
val |= 1 << bit;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline void clear_bit(T &val, const std::size_t &bit) {
|
||||
val &= ~(1 << bit);
|
||||
}
|
||||
} // namespace ircolib
|
||||
|
||||
constexpr ircolib::u32 operator""_kib(const unsigned long long v) { return v * 1024; }
|
||||
|
||||
Reference in New Issue
Block a user