From 9cd89f00854626acfc6d5928e30f3a533e75d800 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 30 Nov 2021 16:56:12 +0100 Subject: [PATCH] LibCpp: Use StringView for the known keywords array --- Userland/Libraries/LibCpp/Lexer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibCpp/Lexer.cpp b/Userland/Libraries/LibCpp/Lexer.cpp index 247ce2f667..3f39b765dd 100644 --- a/Userland/Libraries/LibCpp/Lexer.cpp +++ b/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); } -constexpr char const* s_known_keywords[] = { +constexpr StringView s_known_keywords[] = { "alignas", "alignof", "and", @@ -127,7 +127,7 @@ constexpr char const* s_known_keywords[] = { "xor_eq" }; -constexpr char const* s_known_types[] = { +constexpr StringView s_known_types[] = { "ByteBuffer", "CircularDeque", "CircularQueue",