From 70fdf7affb95679382a1d46cdcea81bd847c8768 Mon Sep 17 00:00:00 2001 From: Tim Ledbetter Date: Fri, 23 Aug 2024 19:53:25 +0100 Subject: [PATCH] IDLGenerators: Add `register` to the list of C++ keywords This ensures that a generated C++ method called `register` will have an underscore appended to it, avoiding a compile error. --- .../CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp index e9ba8b959a9..a2e8e85f236 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibWeb/BindingsGenerator/IDLGenerators.cpp @@ -262,7 +262,7 @@ CppType idl_type_name_to_cpp_type(Type const& type, Interface const& interface) static ByteString make_input_acceptable_cpp(ByteString const& input) { - if (input.is_one_of("class", "template", "for", "default", "char", "namespace", "delete", "inline")) { + if (input.is_one_of("class", "template", "for", "default", "char", "namespace", "delete", "inline", "register")) { StringBuilder builder; builder.append(input); builder.append('_');