diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2020-10-19 19:42:00 -0700 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2020-10-20 11:40:27 -0700 |
commit | a3ea46f77385a2a489a06209d47d1fe1b911848f (patch) | |
tree | ffb5bda67d65b8c51e2fdf447e3663918507376a /common/albyte.h | |
parent | 1acfd1163530576534e4860421dfee0ef4b7cdda (diff) |
Add some missing constexpr attributes
Diffstat (limited to 'common/albyte.h')
-rw-r--r-- | common/albyte.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/albyte.h b/common/albyte.h index f21b45ec..241ce7ad 100644 --- a/common/albyte.h +++ b/common/albyte.h @@ -41,11 +41,11 @@ template<typename T, REQUIRES(std::is_integral<T>::value)> \ inline constexpr al::byte operator op (al::byte lhs, T rhs) noexcept \ { return al::byte(to_integer<unsigned int>(lhs) op static_cast<unsigned int>(rhs)); } \ template<typename T, REQUIRES(std::is_integral<T>::value)> \ -inline al::byte& operator opeq (al::byte &lhs, T rhs) noexcept \ +inline constexpr al::byte& operator opeq (al::byte &lhs, T rhs) noexcept \ { lhs = lhs op rhs; return lhs; } \ inline constexpr al::byte operator op (al::byte lhs, al::byte rhs) noexcept \ { return al::byte(lhs op to_integer<unsigned int>(rhs)); } \ -inline al::byte& operator opeq (al::byte &lhs, al::byte rhs) noexcept \ +inline constexpr al::byte& operator opeq (al::byte &lhs, al::byte rhs) noexcept \ { lhs = lhs op rhs; return lhs; } AL_DECL_OP(|, |=) |