use std::make_shared where possible

may avoid extra alloc for ref. counter
This commit is contained in:
Michael Davidsaver
2019-12-19 18:42:39 -08:00
parent 71905b314b
commit 68cb777702
7 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ void ServerConn::handle_CREATE_CHANNEL()
sid = nextSID++;
} while(chanBySID.find(sid)!=chanBySID.end());
std::shared_ptr<ServerChan> chan(new ServerChan(self, sid, cid, name));
auto chan(std::make_shared<ServerChan>(self, sid, cid, name));
std::unique_ptr<server::ChannelControl> op(new ServerChannelControl(self, chan));
for(auto& pair : iface->server->sources) {