From f40b7ba315fc4db7d435cc35ecca77b7afd57edf Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 9 Oct 2022 23:15:19 +0000 Subject: [PATCH] Use explicitly defaulted rgb_t::operator== --- common/include/palette.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/include/palette.h b/common/include/palette.h index 78fd059d6..4c403e508 100644 --- a/common/include/palette.h +++ b/common/include/palette.h @@ -38,12 +38,12 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. struct rgb_t { ubyte r,g,b; + [[nodiscard]] + constexpr bool operator==(const rgb_t &) const = default; }; typedef uint8_t color_t; -static inline bool operator==(const rgb_t &a, const rgb_t &b) { return a.r == b.r && a.g == b.g && a.b == b.b; } - namespace dcx { struct palette_array_t : public std::array {};