8000 src: make minor tweaks to quic c++ for c++20 · nodejs/node@295c17c · GitHub
[go: up one dir, main page]

Skip to content

Commit 295c17c

Browse files
jasnelltargos
authored andcommitted
src: make minor tweaks to quic c++ for c++20
PR-URL: #53256 Reviewed-By: Stephen Belanger <admin@stephenbelanger.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
1 parent 75073c5 commit 295c17c

19 files changed

+38
-77
lines changed

src/quic/application.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
#include "sessionticket.h"
1111
#include "streams.h"
1212

13-
namespace node {
14-
namespace quic {
13+
namespace node::quic {
1514

1615
// An Application implements the ALPN-protocol specific semantics on behalf
1716
// of a QUIC Session.
@@ -154,8 +153,7 @@ struct Session::Application::StreamData final {
154153
std::string ToString() const;
155154
};
156155

157-
} // namespace quic
158-
} // namespace node
156+
} // namespace node::quic
159157

160158
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
161159
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/bindingdata.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
#include <vector>
1717
#include "defs.h"
1818

19-
namespace node {
20-
namespace quic {
19+
namespace node::quic {
2120

2221
class Endpoint;
2322
class Packet;
@@ -267,8 +266,7 @@ struct CallbackScope final : public CallbackScopeBase {
267266
explicit CallbackScope(T* ptr) : CallbackScopeBase(ptr->env()), ref(ptr) {}
268267
};
269268

270-
} // namespace quic
271-
} // namespace node
269+
} // namespace node::quic
272270

273271
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
274272
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/cid.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
#include "ncrypto.h"
99
#include "quic/defs.h"
1010

11-
namespace node {
12-
namespace quic {
11+
namespace node::quic {
1312

1413
// ============================================================================
1514
// CID
@@ -150,6 +149,5 @@ const CID::Factory& CID::Factory::random() {
150149
return instance;
151150
}
152151

153-
} // namespace quic
154-
} // namespace node
152+
} // namespace node::quic
155153
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC

src/quic/cid.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
#include <string>
88
#include "defs.h"
99

10-
namespace node {
11-
namespace quic {
10+
namespace node::quic {
1211

1312
// CIDS are used to identify endpoints participating in a QUIC session.
1413
// Once created, CID instances are immutable.
@@ -122,8 +121,7 @@ class CID::Factory {
122121
// of CID::Factory that implement the QUIC Load Balancers spec.
123122
};
124123

125-
} // namespace quic
126-
} // namespace node
124+
} // namespace node::quic
127125

128126
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
129127
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/data.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
#include <string>
1414
#include "defs.h"
1515

16-
namespace node {
17-
namespace quic {
16+
namespace node::quic {
1817

1918
struct Path final : public ngtcp2_path {
2019
Path(const SocketAddress& local, const SocketAddress& remote);
@@ -143,8 +142,7 @@ class QuicError final : public MemoryRetainer {
143142
const ngtcp2_ccerr* ptr_ = nullptr;
144143
};
145144

146-
} // namespace quic
147-
} // namespace node
145+
} // namespace node::quic
148146

149147
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
150148
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/defs.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
#include <v8.h>
1010
#include <limits>
1111

12-
namespace node {
13-
namespace quic {
12+
namespace node::quic {
1413

1514
#define NGTCP2_SUCCESS 0
1615
#define NGTCP2_ERR(V) (V != NGTCP2_SUCCESS)
@@ -243,5 +242,4 @@ class DebugIndentScope {
243242
static int indent_;
244243
};
245244

246-
} // namespace quic
247-
} // namespace node
245+
} // namespace node::quic

src/quic/endpoint.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#include "sessionticket.h"
1818
#include "tokens.h"
1919

20-
namespace node {
21-
namespace quic {
20+
namespace node::quic {
2221

2322
#define ENDPOINT_CC(V) \
2423
V(RENO, reno) \
@@ -453,8 +452,7 @@ class Endpoint final : public AsyncWrap, public Packet::Listener {
453452
friend class Session;
454453
};
455454

456-
} // namespace quic
457-
} // namespace node
455+
} // namespace node::quic
458456

459457
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
460458
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/http3.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717
#include "session.h"
1818
#include "sessionticket.h"
1919

20-
namespace node {
21-
namespace quic {
20+
namespace node::quic {
2221
namespace {
2322

2423
struct Http3HeadersTraits {
@@ -833,7 +832,6 @@ std::unique_ptr<Session::Application> createHttp3Application(
833832
return std::make_unique<Http3Application>(session, options);
834833
}
835834

836-
} // namespace quic
837-
} // namespace node
835+
} // namespace node::quic
838836

839837
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC

src/quic/http3.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@
55

66
#include "session.h"
77

8-
namespace node {
9-
namespace quic {
10-
8+
namespace node::quic {
119
std::unique_ptr<Session::Application> createHttp3Application(
1210
Session* session, const Session::Application_Options& options);
1311

14-
} // namespace quic
15-
} // namespace node
12+
} // namespace node::quic
1613

1714
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
1815
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

src/quic/logstream.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
#include <stream_base.h>
1010
#include <deque>
1111

12-
namespace node {
13-
namespace quic {
12+
namespace node::quic {
1413

1514
// The LogStream is a utility that the QUIC impl uses to publish both QLog
1615
// and Keylog diagnostic data (one instance for each).
@@ -76,8 +75,7 @@ class LogStream : public AsyncWrap, public StreamBase {
7675
void ensure_space(size_t amt);
7776
};
7877

79-
} // namespace quic
80-
} // namespace node
78+
} // namespace node::quic
8179

8280
#endif // HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC
8381
#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

0 commit comments

Comments
 (0)
0