mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
use std::map::emplace() instead of std::map::insert()
This commit is contained in:
parent
5e187e7001
commit
c784086075
@ -491,7 +491,7 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
|
|||||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC");
|
throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC");
|
||||||
deadlineTimers.erase(name);
|
deadlineTimers.erase(name);
|
||||||
LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name());
|
LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name());
|
||||||
deadlineTimers.insert(std::make_pair(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))));
|
deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
CRPCTable tableRPC;
|
CRPCTable tableRPC;
|
||||||
|
Loading…
Reference in New Issue
Block a user