diff --git a/wifilampapplication.cpp b/wifilampapplication.cpp index 924eef7..a4b8ede 100644 --- a/wifilampapplication.cpp +++ b/wifilampapplication.cpp @@ -85,7 +85,7 @@ void WifiLampApplication::handleRequest(HttpClientConnection *connection, const { auto iter = std::find_if(m_clients.constBegin(), m_clients.constEnd(), - [&parts](WifiLampClient* client){ return clientId(client) == parts.at(2); }); + [&parts](WifiLampClient *client){ return clientId(client) == parts.at(2); }); if(iter == m_clients.constEnd()) throw HttpNotFoundException(request); @@ -94,12 +94,12 @@ void WifiLampApplication::handleRequest(HttpClientConnection *connection, const } static const QHash > actions { - { QStringLiteral("toggle"), [](WifiLampClient* client){ client->toggle(); } }, - { QStringLiteral("on"), [](WifiLampClient* client){ client->on(); } }, - { QStringLiteral("off"), [](WifiLampClient* client){ client->off(); } }, - { QStringLiteral("refresh"), [](WifiLampClient* client){ client->requestStatus(); } }, - { QStringLiteral("reboot"), [](WifiLampClient* client){ client->reboot(); } }, - { QStringLiteral("delete"), [](WifiLampClient* client){ client->deleteLater(); } } + { QStringLiteral("toggle"), [](WifiLampClient *client){ client->toggle(); } }, + { QStringLiteral("on"), [](WifiLampClient *client){ client->on(); } }, + { QStringLiteral("off"), [](WifiLampClient *client){ client->off(); } }, + { QStringLiteral("refresh"), [](WifiLampClient *client){ client->requestStatus(); } }, + { QStringLiteral("reboot"), [](WifiLampClient *client){ client->reboot(); } }, + { QStringLiteral("delete"), [](WifiLampClient *client){ client->deleteLater(); } } }; { diff --git a/wifilampclient.cpp b/wifilampclient.cpp index 1732b11..26a959c 100644 --- a/wifilampclient.cpp +++ b/wifilampclient.cpp @@ -91,7 +91,7 @@ void WifiLampClient::readyRead() if(m_waitingForName) { const auto iter = std::find_if(m_application.clients().constBegin(), m_application.clients().constEnd(), - [&line](auto client) { return client->name() == line; }); + [&line](WifiLampClient *client) { return client->name() == line; }); if(iter != m_application.clients().constEnd()) delete *iter;