From a7477704c417f9d51eb8e859db148f12423732a2 Mon Sep 17 00:00:00 2001 From: gengjiawen Date: Sun, 9 Aug 2020 21:45:16 +0800 Subject: [PATCH] quic: prefer modernize-make-unique PR-URL: https://github.com/nodejs/node/pull/34692 Reviewed-By: Anna Henningsen Reviewed-By: David Carlier Reviewed-By: James M Snell --- src/quic/node_quic_session.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/quic/node_quic_session.cc b/src/quic/node_quic_session.cc index 332b1e2e586388..5bffad8a4fa524 100644 --- a/src/quic/node_quic_session.cc +++ b/src/quic/node_quic_session.cc @@ -31,6 +31,7 @@ #include "uv.h" #include +#include #include #include #include @@ -1621,12 +1622,12 @@ QuicSession::QuicSession( PushListener(&default_listener_); set_connection_id_strategy(RandomConnectionIDStrategy); set_preferred_address_strategy(preferred_address_strategy); - crypto_context_.reset( - new QuicCryptoContext( + crypto_context_ = std::make_unique( + this, secure_context, side, - options)); + options); application_.reset(SelectApplication(this)); wrap->DefineOwnProperty(