From 5486d912019a767295c0286f6af9e13c71056e44 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Sat, 7 Nov 2020 23:17:00 +0100 Subject: [PATCH] Fix style --- src/common/communication.h | 2 +- src/plugin/host-process.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/communication.h b/src/common/communication.h index c01e67af..ddaa80ca 100644 --- a/src/common/communication.h +++ b/src/common/communication.h @@ -589,7 +589,7 @@ class EventHandler { F callback) { // Reading, processing, and writing back event data from the sockets // works in the same way regardless of which socket we're using - auto process_event = + const auto process_event = [&](boost::asio::local::stream_protocol::socket& socket, bool on_main_thread) { auto event = read_object(socket); diff --git a/src/plugin/host-process.cpp b/src/plugin/host-process.cpp index e4d28ac1..c40ae364 100644 --- a/src/plugin/host-process.cpp +++ b/src/plugin/host-process.cpp @@ -175,8 +175,8 @@ GroupHost::GroupHost(boost::asio::io_context& io_context, const fs::path endpoint_base_dir = sockets.base_dir; const fs::path group_socket_path = generate_group_endpoint(group_name, wine_prefix, plugin_arch); - auto connect = [&io_context, plugin_path, endpoint_base_dir, - group_socket_path]() { + const auto connect = [&io_context, plugin_path, endpoint_base_dir, + group_socket_path]() { boost::asio::local::stream_protocol::socket group_socket(io_context); group_socket.connect(group_socket_path.string()); @@ -201,7 +201,7 @@ GroupHost::GroupHost(boost::asio::io_context& io_context, bp::std_out = stdout_pipe, bp::std_err = stderr_pipe); group_host.detach(); - pid_t group_host_pid = group_host.id(); + const pid_t group_host_pid = group_host.id(); group_host_connect_handler = std::jthread([this, connect, group_socket_path, plugin_path, endpoint_base_dir, group_host_pid]() {