diff options
| author | Maxime Coste <mawww@kakoune.org> | 2025-07-08 11:43:17 +1000 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2025-07-08 12:07:33 +1000 |
| commit | ce1d512a0c1922ab5f43f28e7bae573508c98601 (patch) | |
| tree | 7af8effd6b00c304cda1c87f657a0014fcdae2ae /src/remote.cc | |
| parent | fea08fc18d268ace4f843ec2b57cc33e36562098 (diff) | |
Replace std::unique_ptr with a custom implementation
<memory> is a costly header we can avoid by just implementing
UniquePtr ourselves, which is a pretty straightforward in modern
C++, this saves around 10% of the compilation time here.
Diffstat (limited to 'src/remote.cc')
| -rw-r--r-- | src/remote.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/remote.cc b/src/remote.cc index f4e62419..871b967e 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -655,7 +655,7 @@ bool check_session(StringView session) return connect(sock, (sockaddr*)&addr, sizeof(addr.sun_path)) != -1; } -RemoteClient::RemoteClient(StringView session, StringView name, std::unique_ptr<UserInterface>&& ui, +RemoteClient::RemoteClient(StringView session, StringView name, UniquePtr<UserInterface>&& ui, int pid, const EnvVarMap& env_vars, StringView init_command, Optional<BufferCoord> init_coord, Optional<int> stdin_fd) : m_ui(std::move(ui)) @@ -810,7 +810,7 @@ private: AutoScroll::NotInitially); auto* ui = new RemoteUI{sock, dimensions}; ClientManager::instance().create_client( - std::unique_ptr<UserInterface>(ui), pid, std::move(name), + UniquePtr<UserInterface>(ui), pid, std::move(name), std::move(env_vars), init_cmds, {}, init_coord, [ui](int status) { ui->exit(status); }); |
