From 5c4bb039266242ee606aceabba5926831de46e83 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 4 Mar 2022 22:01:26 +0100 Subject: [PATCH] LibGfx+GameOfLife: Remove Gfx::make_rgb() and its one user --- Userland/Games/GameOfLife/BoardWidget.cpp | 2 +- Userland/Libraries/LibGfx/Color.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Userland/Games/GameOfLife/BoardWidget.cpp b/Userland/Games/GameOfLife/BoardWidget.cpp index 09000b4aa1..6daffc5390 100644 --- a/Userland/Games/GameOfLife/BoardWidget.cpp +++ b/Userland/Games/GameOfLife/BoardWidget.cpp @@ -139,7 +139,7 @@ void BoardWidget::paint_event(GUI::PaintEvent& event) bool on = m_board->cell(row, column); if (on) { - fill_color = Color::from_rgb(Gfx::make_rgb(220, 220, 80)); + fill_color = Color::from_rgb(0xdcdc50); } else { fill_color = Color::MidGray; } diff --git a/Userland/Libraries/LibGfx/Color.h b/Userland/Libraries/LibGfx/Color.h index 38975db38e..062910e05a 100644 --- a/Userland/Libraries/LibGfx/Color.h +++ b/Userland/Libraries/LibGfx/Color.h @@ -19,11 +19,6 @@ namespace Gfx { enum class ColorRole; typedef u32 RGBA32; -constexpr u32 make_rgb(u8 r, u8 g, u8 b) -{ - return ((r << 16) | (g << 8) | b); -} - struct HSV { double hue { 0 }; double saturation { 0 };