Explorar el Código

LibWeb: Use code_points helper for getting delim CSS token codepoint

This is less code, and more expressive.
Shannon Booth hace 1 año
padre
commit
2dce09b12e
Se han modificado 1 ficheros con 1 adiciones y 2 borrados
  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
 
 #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