Skip to content

Commit c784086

Browse files
committed
use std::map::emplace() instead of std::map::insert()
1 parent 5e187e7 commit c784086

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/rpc/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ void RPCRunLater(const std::string& name, boost::function<void(void)> func, int6
491491
throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC");
492492
deadlineTimers.erase(name);
493493
LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name());
494-
deadlineTimers.insert(std::make_pair(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000))));
494+
deadlineTimers.emplace(name, std::unique_ptr<RPCTimerBase>(timerInterface->NewTimer(func, nSeconds*1000)));
495495
}
496496

497497
CRPCTable tableRPC;

0 commit comments

Comments
 (0)