mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
Userland: Remove dummy IPC methods
They're not used anywhere and are unnecessary boilerplate code. So let's remove them and update IPCCompiler to allow for empty endpoint declarations.
This commit is contained in:
parent
62f9377656
commit
ac650d2362
Notes:
sideshowbarker
2024-07-18 11:36:20 +09:00
Author: https://github.com/gunnarbeutner Commit: https://github.com/SerenityOS/serenity/commit/ac650d23624 Pull-request: https://github.com/SerenityOS/serenity/pull/8221
11 changed files with 4 additions and 19 deletions
|
@ -189,11 +189,11 @@ int main(int argc, char** argv)
|
|||
|
||||
auto parse_messages = [&] {
|
||||
for (;;) {
|
||||
consume_whitespace();
|
||||
parse_message();
|
||||
consume_whitespace();
|
||||
if (lexer.peek() == '}')
|
||||
break;
|
||||
parse_message();
|
||||
consume_whitespace();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -366,7 +366,7 @@ public:
|
|||
static i32 static_message_id() { return (int)MessageID::@message.pascal_name@; }
|
||||
virtual const char* message_name() const override { return "@endpoint.name@::@message.pascal_name@"; }
|
||||
|
||||
static OwnPtr<@message.pascal_name@> decode(InputMemoryStream& stream, int sockfd)
|
||||
static OwnPtr<@message.pascal_name@> decode(InputMemoryStream& stream, [[maybe_unused]] int sockfd)
|
||||
{
|
||||
IPC::Decoder decoder { stream, sockfd };
|
||||
)~~~");
|
||||
|
@ -629,7 +629,7 @@ public:
|
|||
|
||||
static u32 static_magic() { return @endpoint.magic@; }
|
||||
|
||||
static OwnPtr<IPC::Message> decode_message(ReadonlyBytes buffer, int sockfd)
|
||||
static OwnPtr<IPC::Message> decode_message(ReadonlyBytes buffer, [[maybe_unused]] int sockfd)
|
||||
{
|
||||
InputMemoryStream stream { buffer };
|
||||
u32 message_endpoint_magic = 0;
|
||||
|
|
|
@ -25,8 +25,6 @@ private:
|
|||
: IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, "/tmp/portal/inspector")
|
||||
{
|
||||
}
|
||||
|
||||
virtual void dummy() override { }
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -43,7 +43,6 @@ private:
|
|||
: IPC::ServerConnection<LaunchClientEndpoint, LaunchServerEndpoint>(*this, "/tmp/portal/launch")
|
||||
{
|
||||
}
|
||||
virtual void dummy() override { }
|
||||
};
|
||||
|
||||
static LaunchServerConnection& connection()
|
||||
|
|
|
@ -30,7 +30,6 @@ private:
|
|||
, m_notification(notification)
|
||||
{
|
||||
}
|
||||
virtual void dummy() override { }
|
||||
Notification* m_notification;
|
||||
};
|
||||
|
||||
|
|
|
@ -20,10 +20,6 @@ void Client::die()
|
|||
on_death();
|
||||
}
|
||||
|
||||
void Client::dummy()
|
||||
{
|
||||
}
|
||||
|
||||
Optional<DecodedImage> Client::decode_image(const ByteBuffer& encoded_data)
|
||||
{
|
||||
if (encoded_data.is_empty())
|
||||
|
|
|
@ -38,8 +38,6 @@ private:
|
|||
Client();
|
||||
|
||||
virtual void die() override;
|
||||
|
||||
virtual void dummy() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
endpoint ImageDecoderClient
|
||||
{
|
||||
dummy() =|
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
endpoint InspectorClient
|
||||
{
|
||||
dummy() =|
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
endpoint LaunchClient
|
||||
{
|
||||
dummy() =|
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
endpoint LookupClient
|
||||
{
|
||||
dummy() =|
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
endpoint NotificationClient
|
||||
{
|
||||
dummy() =|
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue