refactor: make ServerApp::HandleScreenSwitch, Also does not use the Event * so removing it from the methods arguments
This commit is contained in:
parent
dcb047b6c5
commit
f0bb4e5cb3
2 changed files with 3 additions and 3 deletions
|
|
@ -555,7 +555,7 @@ Server *ServerApp::openServer(ServerConfig &config, PrimaryClient *primaryClient
|
||||||
auto *server = new Server(config, primaryClient, m_serverScreen, m_events, args());
|
auto *server = new Server(config, primaryClient, m_serverScreen, m_events, args());
|
||||||
try {
|
try {
|
||||||
m_events->addHandler(EventTypes::ServerDisconnected, server, [this](const auto &) { updateStatus(); });
|
m_events->addHandler(EventTypes::ServerDisconnected, server, [this](const auto &) { updateStatus(); });
|
||||||
m_events->addHandler(EventTypes::ServerScreenSwitched, server, [this](const auto &e) { handleScreenSwitched(e); });
|
m_events->addHandler(EventTypes::ServerScreenSwitched, server, [this](const auto &) { handleScreenSwitched(); });
|
||||||
|
|
||||||
} catch (std::bad_alloc &ba) {
|
} catch (std::bad_alloc &ba) {
|
||||||
delete server;
|
delete server;
|
||||||
|
|
@ -565,7 +565,7 @@ Server *ServerApp::openServer(ServerConfig &config, PrimaryClient *primaryClient
|
||||||
return server;
|
return server;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerApp::handleScreenSwitched(const Event &e)
|
void ServerApp::handleScreenSwitched() const
|
||||||
{
|
{
|
||||||
// do nothing
|
// do nothing
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void handleScreenSwitched(const Event &e);
|
void handleScreenSwitched() const;
|
||||||
std::unique_ptr<ISocketFactory> getSocketFactory() const;
|
std::unique_ptr<ISocketFactory> getSocketFactory() const;
|
||||||
NetworkAddress getAddress(const NetworkAddress &address) const;
|
NetworkAddress getAddress(const NetworkAddress &address) const;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue