Use lambda function instead of anonymous namespace function

This commit is contained in:
Tobias Blomberg 2020-07-25 00:50:58 +02:00
parent e30b3f5955
commit 71d43d0c96
1 changed files with 2 additions and 11 deletions

View File

@ -31,6 +31,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
****************************************************************************/
#include <cassert>
#include <json/json.h>
/****************************************************************************
@ -44,7 +45,6 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#include <AsyncUdpSocket.h>
#include <AsyncApplication.h>
#include <common.h>
#include <json/json.h>
/****************************************************************************
@ -91,9 +91,6 @@ using namespace Async;
*
****************************************************************************/
namespace {
void delete_client(ReflectorClient *client);
};
/****************************************************************************
@ -104,7 +101,6 @@ void delete_client(ReflectorClient *client);
/****************************************************************************
*
* Local Global Variables
@ -385,7 +381,7 @@ void Reflector::clientDisconnected(Async::FramedTcpConnection *con,
broadcastMsg(MsgNodeLeft(client->callsign()),
ReflectorClient::ExceptFilter(client));
}
Application::app().runTask(sigc::bind(sigc::ptr_fun(&delete_client), client));
Application::app().runTask([=]{ delete client; });
} /* Reflector::clientDisconnected */
@ -766,11 +762,6 @@ void Reflector::httpClientDisconnected(Async::HttpServerConnection *con,
} /* Reflector::httpClientDisconnected */
namespace {
void delete_client(ReflectorClient *client) { delete client; }
};
/*
* This file has not been truncated
*/