getting to my first branch now

This commit is contained in:
2026-05-12 14:27:59 +02:00
parent e598f02995
commit 2be9570aa9
6 changed files with 50 additions and 5 deletions
+19
View File
@@ -11,6 +11,25 @@ using s16 = int16_t;
using s32 = int32_t;
using s64 = int64_t;
template <typename T, size_t bit>
static constexpr bool is_bit_set(const T &val) {
return val & (1 << bit);
}
template <typename T, size_t bit>
static constexpr void set_bit(T &val) {
val |= 1 << bit;
}
template <typename T>
inline bool is_bit_set(const T &val, const size_t &bit) {
return val & (1 << bit);
}
template <typename T>
inline void set_bit(T &val, const size_t &bit) {
val |= 1 << bit;
}
} // namespace ircolib
constexpr ircolib::u32 operator""_kib(const unsigned long long v) { return v * 1024; }