From 3b55bebadcb69e82dc768524d1b833d984b1cff1 Mon Sep 17 00:00:00 2001 From: Nathan Woods Date: Sun, 15 Jan 2017 10:59:14 -0500 Subject: [PATCH] Removing unnecessary callback I'm doing this in response to a compilation error on MSVC 2015. As far as I can tell, this is a bug in the compiler. My basis for asserting this is that placing the following declaration within the 'endpoint.on_open = <>' gives the same compilation error: const std::function mycallback = [](void) {}; Whereas moving that logic outside of the 'endpoint.on_open = <>' does not give an error. Normally I don't like working around buggy compilers, but in this case the callback is supposed to be optional anyways. --- src/emu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emu/main.cpp b/src/emu/main.cpp index e8e07ea52b1..ea77d976b00 100644 --- a/src/emu/main.cpp +++ b/src/emu/main.cpp @@ -182,7 +182,7 @@ void machine_manager::start_http_server() endpoint.on_open = [&](auto connection) { auto send_stream = std::make_shared(); *send_stream << "update_machine"; - m_wsserver->send(connection, send_stream, [](const std::error_code& ec) { }); + m_wsserver->send(connection, send_stream); }; m_server->on_upgrade = [this](auto socket, auto request) {