Skip to content

Commit c231e6f

Browse files
gengjiawensbaayel
authored andcommitted
quic: prefer modernize-make-unique
PR-URL: #34692 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent dd05409 commit c231e6f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/quic/node_quic_session.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#include "uv.h"
3232

3333
#include <algorithm>
34+
#include <memory>
3435
#include <vector>
3536
#include <string>
3637
#include <utility>
@@ -1621,12 +1622,12 @@ QuicSession::QuicSession(
16211622
PushListener(&default_listener_);
16221623
set_connection_id_strategy(RandomConnectionIDStrategy);
16231624
set_preferred_address_strategy(preferred_address_strategy);
1624-
crypto_context_.reset(
1625-
new QuicCryptoContext(
1625+
crypto_context_ = std::make_unique<QuicCryptoContext>(
1626+
16261627
this,
16271628
secure_context,
16281629
side,
1629-
options));
1630+
options);
16301631
application_.reset(SelectApplication(this));
16311632

16321633
wrap->DefineOwnProperty(

0 commit comments

Comments
 (0)