1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:58:12 +00:00

LibWeb: Use code_points helper for getting delim CSS token codepoint

This is less code, and more expressive.
This commit is contained in:
Shannon Booth 2023-12-09 09:16:55 +13:00 committed by Alexander Kalenik
parent 74284abcba
commit 2dce09b12e

View file

@ -8,7 +8,6 @@
#pragma once
#include <AK/FlyString.h>
#include <AK/Utf8View.h>
#include <LibWeb/CSS/Number.h>
namespace Web::CSS::Parser {
@ -74,7 +73,7 @@ public:
u32 delim() const
{
VERIFY(m_type == Type::Delim);
return *Utf8View(m_value.bytes_as_string_view()).begin();
return *m_value.code_points().begin();
}
FlyString const& string() const