summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2026-02-05 20:36:19 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2026-02-15 20:14:15 -0600
commitcda344329afa7ef5bfdd814378d8457c8d15e289 (patch)
tree5fbb18e520c9075a1fd388cfe9b37fbab4168c32 /Source/Core
parent12df15eded548b1c55a5e097ae3efd55833bc67f (diff)
Common/BitUtils: Make SetBit constexpr.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/BitUtils.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/Common/BitUtils.h b/Source/Core/Common/BitUtils.h
index 19eea49486..458fff63a3 100644
--- a/Source/Core/Common/BitUtils.h
+++ b/Source/Core/Common/BitUtils.h
@@ -189,7 +189,7 @@ template <typename ValueType, typename From>
}
template <typename T>
-void SetBit(T& value, size_t bit_number, bool bit_value)
+constexpr void SetBit(T& value, size_t bit_number, bool bit_value)
{
static_assert(std::is_unsigned<T>(), "SetBit is only sane on unsigned types.");
@@ -200,7 +200,7 @@ void SetBit(T& value, size_t bit_number, bool bit_value)
}
template <size_t bit_number, typename T>
-void SetBit(T& value, bool bit_value)
+constexpr void SetBit(T& value, bool bit_value)
{
SetBit(value, bit_number, bit_value);
}