From f0269daeb6f1913406bb55d0e283cdcb6cd54f28 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Thu, 23 May 2024 22:44:33 -0400 Subject: [PATCH] LibGfx: Make `Color::NamedColor` be an enum class As this is used extensively across the codebase, the change would add a lot of noise. To prevent it, let's also add an `using enum` declaration. --- Userland/Libraries/LibGfx/Color.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Userland/Libraries/LibGfx/Color.h b/Userland/Libraries/LibGfx/Color.h index cb570e4e0c7..0aec3bc2ffc 100644 --- a/Userland/Libraries/LibGfx/Color.h +++ b/Userland/Libraries/LibGfx/Color.h @@ -40,7 +40,7 @@ struct Oklab { class Color { public: - enum NamedColor { + enum class NamedColor { Transparent, Black, White, @@ -66,6 +66,8 @@ public: LightBlue, }; + using enum NamedColor; + constexpr Color() = default; constexpr Color(NamedColor); constexpr Color(u8 r, u8 g, u8 b)