diff options
Diffstat (limited to 'Meta/Lagom/Tools/CodeGenerators')
3 files changed, 13 insertions, 13 deletions
diff --git a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp index b93e9f9919..36680fbf86 100644 --- a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp @@ -282,7 +282,7 @@ String constructor_for_message(String const& name, Vector<Parameter> const& para return builder.to_string(); } -void do_message(SourceGenerator message_generator, const String& name, const Vector<Parameter>& parameters, const String& response_type = {}) +void do_message(SourceGenerator message_generator, String const& name, Vector<Parameter> const& parameters, String const& response_type = {}) { auto pascal_name = pascal_case(name); message_generator.set("message.name", name); @@ -598,7 +598,7 @@ public: switch (message_id) {)~~~"); for (auto const& message : endpoint.messages) { - auto do_decode_message = [&](const String& name) { + auto do_decode_message = [&](String const& name) { auto message_generator = generator.fork(); message_generator.set("message.name", name); diff --git a/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp b/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp index 7aee4e4ab6..528d03a2c9 100644 --- a/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/LibEDID/GeneratePnpIDs.cpp @@ -125,7 +125,7 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn HashMap<String, PnpIdData> pnp_id_data; for (size_t row_content_offset = 0;;) { - static const auto row_start_tag = "<tr class=\""sv; + static auto const row_start_tag = "<tr class=\""sv; auto row_start = pnp_ids_file_contents.find(row_start_tag, row_content_offset); if (!row_start.has_value()) break; @@ -134,7 +134,7 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn if (!row_start_tag_end.has_value()) return Error::from_string_literal("Incomplete row start tag"sv); - static const auto row_end_tag = "</tr>"sv; + static auto const row_end_tag = "</tr>"sv; auto row_end = pnp_ids_file_contents.find(row_end_tag, row_start.value()); if (!row_end.has_value()) return Error::from_string_literal("No matching row end tag found"sv); @@ -145,12 +145,12 @@ static ErrorOr<HashMap<String, PnpIdData>> parse_pnp_ids_database(Core::File& pn auto row_string = pnp_ids_file_contents.substring_view(row_start_tag_end.value() + 1, row_end.value() - row_start_tag_end.value() - 1); Vector<String, (size_t)PnpIdColumns::ColumnCount> columns; for (size_t column_row_offset = 0;;) { - static const auto column_start_tag = "<td>"sv; + static auto const column_start_tag = "<td>"sv; auto column_start = row_string.find(column_start_tag, column_row_offset); if (!column_start.has_value()) break; - static const auto column_end_tag = "</td>"sv; + static auto const column_end_tag = "</td>"sv; auto column_end = row_string.find(column_end_tag, column_start.value() + column_start_tag.length()); if (!column_end.has_value()) return Error::from_string_literal("No matching column end tag found"sv); diff --git a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp index 2c506fbb36..6651764d0e 100644 --- a/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/StateMachineGenerator/main.cpp @@ -211,12 +211,12 @@ parse_state_machine(StringView input) return state_machine; } -void output_header(const StateMachine&, SourceGenerator&); +void output_header(StateMachine const&, SourceGenerator&); int main(int argc, char** argv) { Core::ArgsParser args_parser; - const char* path = nullptr; + char const* path = nullptr; args_parser.add_positional_argument(path, "Path to parser description", "input", Core::ArgsParser::Required::Yes); args_parser.parse(argc, argv); @@ -235,11 +235,11 @@ int main(int argc, char** argv) return 0; } -HashTable<String> actions(const StateMachine& machine) +HashTable<String> actions(StateMachine const& machine) { HashTable<String> table; - auto do_state = [&](const State& state) { + auto do_state = [&](State const& state) { if (state.entry_action.has_value()) table.set(state.entry_action.value()); if (state.exit_action.has_value()) @@ -257,13 +257,13 @@ HashTable<String> actions(const StateMachine& machine) return table; } -void generate_lookup_table(const StateMachine& machine, SourceGenerator& generator) +void generate_lookup_table(StateMachine const& machine, SourceGenerator& generator) { generator.append(R"~~~( static constexpr StateTransition STATE_TRANSITION_TABLE[][256] = { )~~~"); - auto generate_for_state = [&](const State& s) { + auto generate_for_state = [&](State const& s) { auto table_generator = generator.fork(); table_generator.set("active_state", s.name); table_generator.append("/* @active_state@ */ { "); @@ -295,7 +295,7 @@ void generate_lookup_table(const StateMachine& machine, SourceGenerator& generat )~~~"); } -void output_header(const StateMachine& machine, SourceGenerator& generator) +void output_header(StateMachine const& machine, SourceGenerator& generator) { generator.set("class_name", machine.name); generator.set("initial_state", machine.initial_state); |