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
@@ -137,7 +137,7 @@ void ServerConn::handle_GET_FIELD()
return;
}
std::shared_ptr<ServerIntrospect> op(new ServerIntrospect(chan, ioid));
auto op(std::make_shared<ServerIntrospect>(chan, ioid));
std::unique_ptr<ServerIntrospectControl> ctrl(new ServerIntrospectControl(this, chan.get(), iface->server->internal_self, op));
op->state = ServerOp::Executing; // this is a one-shot operation