1
0
Fork 0

use make_unique

This commit is contained in:
jsteemann 2016-11-25 15:12:30 +01:00
parent 608c48079b
commit 94865160f5
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ HttpCommTask::HttpCommTask(EventLoop loop, GeneralServer* server,
_protocol = "http";
connectionStatisticsAgentSetHttp();
auto agent = std::unique_ptr<RequestStatisticsAgent>(new RequestStatisticsAgent(true));
auto agent = std::make_unique<RequestStatisticsAgent>(true);
agent->acquire();
MUTEX_LOCKER(lock, _agentsMutex);
_agents.emplace(std::make_pair(1UL, std::move(agent)));
@ -167,7 +167,7 @@ void HttpCommTask::addResponse(HttpResponse* response) {
<< "\"";
}
auto agent = getAgent(1);
auto agent = getAgent(1UL);
double const totalTime = agent->elapsedSinceReadStart();
// append write buffer and statistics