mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00

Problem: - Default destructors (and constructors) are in `.cpp` files. This prevents the compiler's optimizer from inlining them when it thinks inlining is appropriate (unless LTO is used). - Forward declarations can prevent some optimizations, such as inlining of constructors and destructors. Solution: - Remove them or set them to `= default` and let the compiler handle the generation of them. - Remove unneeded forward declarations.
38 lines
857 B
C++
38 lines
857 B
C++
/*
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <InspectorServer/InspectorClientEndpoint.h>
|
|
#include <InspectorServer/InspectorServerEndpoint.h>
|
|
#include <LibIPC/ServerConnection.h>
|
|
|
|
namespace Inspector {
|
|
|
|
class InspectorServerClient final
|
|
: public IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>
|
|
, public InspectorClientEndpoint {
|
|
C_OBJECT(InspectorServerClient);
|
|
|
|
public:
|
|
virtual void handshake() override
|
|
{
|
|
greet();
|
|
}
|
|
|
|
virtual ~InspectorServerClient() override = default;
|
|
|
|
private:
|
|
InspectorServerClient()
|
|
: IPC::ServerConnection<InspectorClientEndpoint, InspectorServerEndpoint>(*this, "/tmp/portal/inspector")
|
|
{
|
|
handshake();
|
|
}
|
|
|
|
virtual void dummy() override { }
|
|
};
|
|
|
|
}
|