diff --git a/src/asyncrpcqueue.cpp b/src/asyncrpcqueue.cpp index 9f59ee71..4994337c 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.cpp @@ -101,7 +101,7 @@ void AsyncRPCQueue::addOperation(const std::shared_ptr &ptrOp std::shared_ptr AsyncRPCQueue::getOperationForId(AsyncRPCOperationId id) const { std::shared_ptr ptr; - std::lock_guard< std::mutex > guard(lock_); + std::lock_guard guard(lock_); AsyncRPCOperationMap::const_iterator iter = operation_map_.find(id); if (iter != operation_map_.end()) { ptr = iter->second; @@ -115,7 +115,7 @@ std::shared_ptr AsyncRPCQueue::getOperationForId(AsyncRPCOper std::shared_ptr AsyncRPCQueue::popOperationForId(AsyncRPCOperationId id) { std::shared_ptr ptr = getOperationForId(id); if (ptr) { - std::lock_guard< std::mutex > guard(lock_); + std::lock_guard guard(lock_); // Note: if the id still exists in the operationIdQueue, when it gets processed by a worker // there will no operation in the map to execute, so nothing will happen. operation_map_.erase(id);