From 744f6ac1fb5ef54cefbc847595fd444b501347fb Mon Sep 17 00:00:00 2001 From: Daniel Brunner <0xFEEDC0DE64@gmail.com> Date: Fri, 5 Oct 2018 00:10:03 +0200 Subject: [PATCH] Replaced cpp14 auto usage with actual type for cpp11 compliance --- wifilampapplication.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wifilampapplication.cpp b/wifilampapplication.cpp index e3d1755..924eef7 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](auto 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"), [](auto client){ client->toggle(); } }, - { QStringLiteral("on"), [](auto client){ client->on(); } }, - { QStringLiteral("off"), [](auto client){ client->off(); } }, - { QStringLiteral("refresh"), [](auto client){ client->requestStatus(); } }, - { QStringLiteral("reboot"), [](auto client){ client->reboot(); } }, - { QStringLiteral("delete"), [](auto 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(); } } }; {