summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-04-06 03:44:22 +0200
committerbunnei <bunneidev@gmail.com>2018-04-14 05:48:18 +0200
commit0315fe8c3dc8cb267284b061a20b85c09cd5d98b (patch)
treeb6e88efcdab7a6752838d974b3f9e66ae94c2874 /src/common
parentMerge pull request #323 from Hexagon12/stub-hid (diff)
downloadyuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar.gz
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar.bz2
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar.lz
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar.xz
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.tar.zst
yuzu-0315fe8c3dc8cb267284b061a20b85c09cd5d98b.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/bit_field.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/common/bit_field.h b/src/common/bit_field.h
index 0cc0a1be0..5638bdbba 100644
--- a/src/common/bit_field.h
+++ b/src/common/bit_field.h
@@ -115,7 +115,7 @@ private:
// assignment would copy the full storage value, rather than just the bits
// relevant to this particular bit field.
// We don't delete it because we want BitField to be trivially copyable.
- BitField& operator=(const BitField&) = default;
+ constexpr BitField& operator=(const BitField&) = default;
// StorageType is T for non-enum types and the underlying type of T if
// T is an enumeration. Note that T is wrapped within an enable_if in the
@@ -166,20 +166,20 @@ public:
// so that we can use this within unions
constexpr BitField() = default;
- FORCE_INLINE operator T() const {
+ constexpr FORCE_INLINE operator T() const {
return Value();
}
- FORCE_INLINE void Assign(const T& value) {
+ constexpr FORCE_INLINE void Assign(const T& value) {
storage = (storage & ~mask) | FormatValue(value);
}
- FORCE_INLINE T Value() const {
+ constexpr T Value() const {
return ExtractValue(storage);
}
// TODO: we may want to change this to explicit operator bool() if it's bug-free in VS2015
- FORCE_INLINE bool ToBool() const {
+ constexpr FORCE_INLINE bool ToBool() const {
return Value() != 0;
}