From 93356ee3dff2ae00f26cd62fe9581510f2a0d2f3 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Mon, 1 Nov 2021 16:02:34 +0100 Subject: [PATCH] IPCCompiler: Remove now-unused ability to hardcode magic number --- .../Tools/CodeGenerators/IPCCompiler/main.cpp | 24 ------------------- 1 file changed, 24 deletions(-) diff --git a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp index 90f451e863..1d5e04e555 100644 --- a/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp +++ b/Meta/Lagom/Tools/CodeGenerators/IPCCompiler/main.cpp @@ -223,30 +223,6 @@ int main(int argc, char** argv) endpoints.last().name = lexer.consume_while([](char ch) { return !isspace(ch); }); endpoints.last().magic = Traits::hash(endpoints.last().name); consume_whitespace(); - if (lexer.peek() == '[') { - // This only supports a single parameter for now, and adding multiple - // endpoint parameter support is left as an exercise for the reader. :^) - - lexer.consume_specific('['); - consume_whitespace(); - - auto parameter = lexer.consume_while([](char ch) { return !isspace(ch) && ch != '='; }); - consume_whitespace(); - assert_specific('='); - consume_whitespace(); - - if (parameter == "magic") { - // "magic" overwrites the default magic with a hardcoded one. - auto magic_string = lexer.consume_while([](char ch) { return !isspace(ch) && ch != ']'; }); - endpoints.last().magic = magic_string.to_uint().value(); - } else { - warnln("parse_endpoint: unknown parameter '{}' passed", parameter); - VERIFY_NOT_REACHED(); - } - - assert_specific(']'); - consume_whitespace(); - } assert_specific('{'); parse_messages(); assert_specific('}');