diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2023-01-30 01:52:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 01:52:38 +0100 |
commit | 5f4647df7da58aa22be21dd26cfa6de7c5f106c9 (patch) | |
tree | 4bbcaee76bde35ddc6eff9a1c639866cf278b353 /src/common/bit_util.h | |
parent | Merge pull request #9699 from ameerj/texture-pass-desc (diff) | |
parent | Move to Clang Format 15 (diff) | |
download | yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.gz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.bz2 yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.lz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.xz yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.tar.zst yuzu-5f4647df7da58aa22be21dd26cfa6de7c5f106c9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/bit_util.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/bit_util.h b/src/common/bit_util.h index e4e6287f3..13368b439 100644 --- a/src/common/bit_util.h +++ b/src/common/bit_util.h @@ -45,19 +45,19 @@ template <typename T> } template <typename T> -requires std::is_unsigned_v<T> + requires std::is_unsigned_v<T> [[nodiscard]] constexpr bool IsPow2(T value) { return std::has_single_bit(value); } template <typename T> -requires std::is_integral_v<T> + requires std::is_integral_v<T> [[nodiscard]] T NextPow2(T value) { return static_cast<T>(1ULL << ((8U * sizeof(T)) - std::countl_zero(value - 1U))); } template <size_t bit_index, typename T> -requires std::is_integral_v<T> + requires std::is_integral_v<T> [[nodiscard]] constexpr bool Bit(const T value) { static_assert(bit_index < BitSize<T>(), "bit_index must be smaller than size of T"); return ((value >> bit_index) & T(1)) == T(1); |