From 88dc5886ebae15094c6f176068948705a8b8ee49 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 6 Nov 2023 12:06:20 +0000 Subject: [PATCH] LibWeb: Use generated to_string() function for EdgeStyleValue edge --- .../LibWeb/CSS/StyleValues/EdgeStyleValue.cpp | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/StyleValues/EdgeStyleValue.cpp b/Userland/Libraries/LibWeb/CSS/StyleValues/EdgeStyleValue.cpp index 3f2de9e9c1..7c9478cd8a 100644 --- a/Userland/Libraries/LibWeb/CSS/StyleValues/EdgeStyleValue.cpp +++ b/Userland/Libraries/LibWeb/CSS/StyleValues/EdgeStyleValue.cpp @@ -10,21 +10,7 @@ namespace Web::CSS { String EdgeStyleValue::to_string() const { - auto to_string = [](PositionEdge edge) { - switch (edge) { - case PositionEdge::Left: - return "left"; - case PositionEdge::Right: - return "right"; - case PositionEdge::Top: - return "top"; - case PositionEdge::Bottom: - return "bottom"; - } - VERIFY_NOT_REACHED(); - }; - - return MUST(String::formatted("{} {}", to_string(m_properties.edge), m_properties.offset.to_string())); + return MUST(String::formatted("{} {}", CSS::to_string(m_properties.edge), m_properties.offset.to_string())); } }