Bladeren bron

LibCpp: Use StringView for the known keywords array

Andreas Kling 3 jaren geleden
bovenliggende
commit
9cd89f0085
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      Userland/Libraries/LibCpp/Lexer.cpp

+ 2 - 2
Userland/Libraries/LibCpp/Lexer.cpp

@@ -51,7 +51,7 @@ constexpr bool is_valid_nonfirst_character_of_identifier(char ch)
     return is_valid_first_character_of_identifier(ch) || is_ascii_digit(ch);
     return is_valid_first_character_of_identifier(ch) || is_ascii_digit(ch);
 }
 }
 
 
-constexpr char const* s_known_keywords[] = {
+constexpr StringView s_known_keywords[] = {
     "alignas",
     "alignas",
     "alignof",
     "alignof",
     "and",
     "and",
@@ -127,7 +127,7 @@ constexpr char const* s_known_keywords[] = {
     "xor_eq"
     "xor_eq"
 };
 };
 
 
-constexpr char const* s_known_types[] = {
+constexpr StringView s_known_types[] = {
     "ByteBuffer",
     "ByteBuffer",
     "CircularDeque",
     "CircularDeque",
     "CircularQueue",
     "CircularQueue",