use std::make_shared where possible
may avoid extra alloc for ref. counter
This commit is contained in:
+1
-1
@@ -110,7 +110,7 @@ Server::Server(Config&& conf)
|
||||
* Which need to safely access server storage, but should not
|
||||
* prevent a server from stopping.
|
||||
*/
|
||||
std::shared_ptr<Pvt> internal(new Pvt(std::move(conf)));
|
||||
auto internal(std::make_shared<Pvt>(std::move(conf)));
|
||||
internal->internal_self = internal;
|
||||
|
||||
// external
|
||||
|
||||
Reference in New Issue
Block a user