33 red(std::move(a_rhs.red)),
34 green(std::move(a_rhs.green)),
35 blue(std::move(a_rhs.blue)),
36 alpha(std::move(a_rhs.alpha))
39 constexpr
Color(std::uint8_t a_red, std::uint8_t a_green, std::uint8_t a_blue, std::uint8_t a_alpha) noexcept :
50 if (
this != std::addressof(a_rhs)) {
61 if (
this != std::addressof(a_rhs)) {
62 red = std::move(a_rhs.red);
63 green = std::move(a_rhs.green);
64 blue = std::move(a_rhs.blue);
65 alpha = std::move(a_rhs.alpha);
72 for (std::size_t i = 0; i <
kTotal; ++i) {
73 if (a_lhs[i] != a_rhs[i]) {
82 return !(a_lhs == a_rhs);
85 [[nodiscard]] constexpr std::uint8_t&
operator[](std::size_t a_idx) noexcept
88 return std::addressof(
red)[a_idx];
91 [[nodiscard]] constexpr
const std::uint8_t&
operator[](std::size_t a_idx)
const noexcept
94 return std::addressof(
red)[a_idx];
103 static_assert(
sizeof(
Color) == 0x4);
Definition: AbsorbEffect.h:6
std::uint8_t blue
Definition: Color.h:100
std::uint8_t red
Definition: Color.h:98
constexpr const std::uint8_t & operator[](std::size_t a_idx) const noexcept
Definition: Color.h:91
constexpr friend bool operator==(const Color &a_lhs, const Color &a_rhs) noexcept
Definition: Color.h:70
constexpr Color(std::uint8_t a_red, std::uint8_t a_green, std::uint8_t a_blue, std::uint8_t a_alpha) noexcept
Definition: Color.h:39
constexpr Color(Color &&a_rhs) noexcept
Definition: Color.h:32
constexpr Color & operator=(Color &&a_rhs) noexcept
Definition: Color.h:59
std::uint8_t green
Definition: Color.h:99
constexpr std::uint8_t & operator[](std::size_t a_idx) noexcept
Definition: Color.h:85
constexpr Color(const Color &a_rhs) noexcept
Definition: Color.h:25
~Color() noexcept=default
constexpr friend bool operator!=(const Color &a_lhs, const Color &a_rhs) noexcept
Definition: Color.h:80
constexpr Color() noexcept
Definition: Color.h:18
std::uint8_t alpha
Definition: Color.h:101
@ kBlue
Definition: Color.h:12
@ kTotal
Definition: Color.h:15
@ kRed
Definition: Color.h:10
@ kGreen
Definition: Color.h:11
@ kAlpha
Definition: Color.h:13