mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-18 13:17:55 +02:00
Replace boost::function with std::function (C++11)
This commit is contained in:
parent
94e52273f3
commit
1b936f5926
11 changed files with 26 additions and 30 deletions
|
|
@ -42,17 +42,17 @@ static struct CRPCSignals
|
|||
boost::signals2::signal<void (const CRPCCommand&)> PreCommand;
|
||||
} g_rpcSignals;
|
||||
|
||||
void RPCServer::OnStarted(boost::function<void ()> slot)
|
||||
void RPCServer::OnStarted(std::function<void ()> slot)
|
||||
{
|
||||
g_rpcSignals.Started.connect(slot);
|
||||
}
|
||||
|
||||
void RPCServer::OnStopped(boost::function<void ()> slot)
|
||||
void RPCServer::OnStopped(std::function<void ()> slot)
|
||||
{
|
||||
g_rpcSignals.Stopped.connect(slot);
|
||||
}
|
||||
|
||||
void RPCServer::OnPreCommand(boost::function<void (const CRPCCommand&)> slot)
|
||||
void RPCServer::OnPreCommand(std::function<void (const CRPCCommand&)> slot)
|
||||
{
|
||||
g_rpcSignals.PreCommand.connect(boost::bind(slot, _1));
|
||||
}
|
||||
|
|
@ -526,7 +526,7 @@ void RPCUnsetTimerInterface(RPCTimerInterface *iface)
|
|||
timerInterface = NULL;
|
||||
}
|
||||
|
||||
void RPCRunLater(const std::string& name, boost::function<void(void)> func, int64_t nSeconds)
|
||||
void RPCRunLater(const std::string& name, std::function<void(void)> func, int64_t nSeconds)
|
||||
{
|
||||
if (!timerInterface)
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue