use std::make_shared where possible

may avoid extra alloc for ref. counter
This commit is contained in:
Michael Davidsaver
2019-12-19 13:55:40 -08:00
parent 71905b314b
commit 68cb777702
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -319,7 +319,7 @@ void ServerConn::handle_GPR(pva_app_msg_t cmd)
return;
}
std::shared_ptr<ServerGPR> op(new ServerGPR(chan, ioid));
auto op(std::make_shared<ServerGPR>(chan, ioid));
op->cmd = cmd;
std::unique_ptr<ServerGPRConnect> ctrl(new ServerGPRConnect(this, iface->server->internal_self, chan->name, pvRequest, op));