mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 09:45:06 +02:00
LibWeb/CSS: Set enum sizes for PropertyID and Keyword
The effect of this is hard to measure, but reducing them from 4 bytes each to 2 bytes can't hurt. :^)
This commit is contained in:
committed by
Shannon Booth
parent
3add623f22
commit
6e45d8ba6c
Notes:
github-actions[bot]
2025-05-19 22:15:17 +00:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/LadybirdBrowser/ladybird/commit/6e45d8ba6cc Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4820
@@ -50,6 +50,7 @@ ErrorOr<void> generate_header_file(JsonArray& keyword_data, Core::File& file)
|
||||
{
|
||||
StringBuilder builder;
|
||||
SourceGenerator generator { builder };
|
||||
generator.set("keyword_underlying_type", underlying_type_for_enum(keyword_data.size()));
|
||||
generator.append(R"~~~(
|
||||
#pragma once
|
||||
|
||||
@@ -58,7 +59,7 @@ ErrorOr<void> generate_header_file(JsonArray& keyword_data, Core::File& file)
|
||||
|
||||
namespace Web::CSS {
|
||||
|
||||
enum class Keyword {
|
||||
enum class Keyword : @keyword_underlying_type@ {
|
||||
Invalid,
|
||||
)~~~");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user