From 7ed49e954f9db90ff335978b3e265b2c078887e8 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 21 Sep 2021 11:28:57 +0200 Subject: [PATCH] LibWeb: Don't print debug spam when looking up missing initial values I'm about to look up a lot of missing values, and the spam was getting out of hand. --- .../CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp index 6421aba9b5..1b5d0ee768 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/Generate_CSS_PropertyID_cpp.cpp @@ -202,12 +202,10 @@ RefPtr property_initial_value(PropertyID property_id) generator.append(R"~~~( } - auto maybe_value = initial_values.get(property_id); - if (!maybe_value.has_value()) { - dbgln("No initial value found for '{}' property!", string_from_property_id(property_id)); + auto it = initial_values.find(property_id); + if (it == initial_values.end()) return nullptr; - } - return maybe_value.value(); + return it->value; } bool property_has_quirk(PropertyID property_id, Quirk quirk)