Przeglądaj źródła

common: bit_util: Add BIT macro.

bunnei 5 lat temu
rodzic
commit
74120c5e3a
1 zmienionych plików z 2 dodań i 0 usunięć
  1. 2 0
      src/common/bit_util.h

+ 2 - 0
src/common/bit_util.h

@@ -44,4 +44,6 @@ template <typename T>
     return static_cast<u32>(log2_f + static_cast<u64>((value ^ (1ULL << log2_f)) != 0ULL));
 }
 
+#define BIT(n) (1U << (n))
+
 } // namespace Common