summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/process_capability.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-01-15 08:02:57 +0100
committerLioncash <mathew1800@gmail.com>2021-01-15 08:15:32 +0100
commit8620de6b2030bef35360d029354f672cde8978f1 (patch)
treeed1f105b1fef3fc9a5209c5106accaaee283ebf2 /src/core/hle/kernel/process_capability.cpp
parentMerge pull request #5354 from ReinUsesLisp/remove-common-color (diff)
downloadyuzu-8620de6b2030bef35360d029354f672cde8978f1.tar
yuzu-8620de6b2030bef35360d029354f672cde8978f1.tar.gz
yuzu-8620de6b2030bef35360d029354f672cde8978f1.tar.bz2
yuzu-8620de6b2030bef35360d029354f672cde8978f1.tar.lz
yuzu-8620de6b2030bef35360d029354f672cde8978f1.tar.xz
yuzu-8620de6b2030bef35360d029354f672cde8978f1.tar.zst
yuzu-8620de6b2030bef35360d029354f672cde8978f1.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/process_capability.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/hle/kernel/process_capability.cpp b/src/core/hle/kernel/process_capability.cpp
index 0f128c586..0566311b6 100644
--- a/src/core/hle/kernel/process_capability.cpp
+++ b/src/core/hle/kernel/process_capability.cpp
@@ -2,6 +2,8 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#include <bit>
+
#include "common/bit_util.h"
#include "common/logging/log.h"
#include "core/hle/kernel/errors.h"
@@ -60,7 +62,7 @@ constexpr CapabilityType GetCapabilityType(u32 value) {
u32 GetFlagBitOffset(CapabilityType type) {
const auto value = static_cast<u32>(type);
- return static_cast<u32>(Common::BitSize<u32>() - Common::CountLeadingZeroes32(value));
+ return static_cast<u32>(Common::BitSize<u32>() - static_cast<u32>(std::countl_zero(value)));
}
} // Anonymous namespace