mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
IPCCompiler: Remove now-unused ability to hardcode magic number
This commit is contained in:
parent
2798a19c70
commit
93356ee3df
Notes:
sideshowbarker
2024-07-18 01:29:44 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/93356ee3dff Pull-request: https://github.com/SerenityOS/serenity/pull/10748 Reviewed-by: https://github.com/alimpfard Reviewed-by: https://github.com/trflynn89
1 changed files with 0 additions and 24 deletions
|
@ -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<String>::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('}');
|
||||
|
|
Loading…
Reference in a new issue