clear bit

This commit is contained in:
2026-05-19 00:05:53 +02:00
parent ec06dab964
commit 7df4ec2246
+5
View File
@@ -30,6 +30,11 @@ template <typename T>
inline void set_bit(T &val, const std::size_t &bit) { inline void set_bit(T &val, const std::size_t &bit) {
val |= 1 << bit; val |= 1 << bit;
} }
template <typename T>
inline void clear_bit(T &val, const std::size_t &bit) {
val &= ~(1 << bit);
}
} // namespace ircolib } // namespace ircolib
constexpr ircolib::u32 operator""_kib(const unsigned long long v) { return v * 1024; } constexpr ircolib::u32 operator""_kib(const unsigned long long v) { return v * 1024; }