فهرست منبع

LibWeb: Use code_points helper for getting delim CSS token codepoint

This is less code, and more expressive.
Shannon Booth 1 سال پیش
والد
کامیت
2dce09b12e
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      Userland/Libraries/LibWeb/CSS/Parser/Token.h

+ 1 - 2
Userland/Libraries/LibWeb/CSS/Parser/Token.h

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