Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 3bd75b5

Browse files
danbevaddaleax
authored andcommitted
src: fix lint-cpp issues
PR-URL: #224 Reviewed-By: Anna Henningsen <[email protected]>
1 parent a8ac638 commit 3bd75b5

10 files changed

+6
-17
lines changed

src/node_crypto.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
#include "tls_wrap.h" // TLSWrap
3333

3434
#include "async_wrap-inl.h"
35-
#include "base_object-inl.h"
3635
#include "env-inl.h"
3736
#include "memory_tracker-inl.h"
3837
#include "string_bytes.h"

src/node_crypto_common.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ namespace node {
1818
using v8::Array;
1919
using v8::Context;
2020
using v8::Integer;
21-
using v8::Isolate;
2221
using v8::Local;
2322
using v8::Object;
2423
using v8::Value;

src/node_quic_crypto.cc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,7 @@
2828
namespace node {
2929

3030
using crypto::EntropySource;
31-
using v8::Array;
32-
using v8::Integer;
3331
using v8::Local;
34-
using v8::Object;
3532
using v8::String;
3633
using v8::Value;
3734

src/node_quic_http3_application.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ namespace node {
1616

1717
using v8::Eternal;
1818
using v8::MaybeLocal;
19-
using v8::Number;
2019
using v8::String;
2120
using v8::Value;
2221

@@ -510,7 +509,7 @@ bool Http3Application::SendPendingData() {
510509
// }
511510
// continue;
512511
}
513-
//Session()->SetLastError(QUIC_ERROR_APPLICATION, nwrite);
512+
// Session()->SetLastError(QUIC_ERROR_APPLICATION, nwrite);
514513
return false;
515514
}
516515

src/node_quic_session.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,6 @@ void JSQuicSessionListener::OnSessionTicket(int size, SSL_SESSION* session) {
607607
Session()->MakeCallback(
608608
env->quic_on_session_ticket_function(),
609609
arraysize(argv), argv);
610-
611610
}
612611

613612
void JSQuicSessionListener::OnSessionSilentClose(

src/node_quic_socket.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,7 @@ bool QuicSocket::SendStatelessReset(
599599
NGTCP2_MAX_PKTLEN_IPV4,
600600
token,
601601
random,
602-
RANDLEN
603-
);
602+
RANDLEN);
604603
if (nwrite <= 0)
605604
return false;
606605
buf.Realloc(nwrite);

src/node_quic_stream.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ using v8::Array;
2323
using v8::Context;
2424
using v8::FunctionCallbackInfo;
2525
using v8::FunctionTemplate;
26-
using v8::Integer;
2726
using v8::Isolate;
2827
using v8::Local;
2928
using v8::Object;
@@ -336,9 +335,9 @@ void QuicStream::ReceiveData(
336335
// Reading can be paused while we are processing. If that's
337336
// the case, we still want to acknowledge the current bytes
338337
// so that pausing does not throw off our flow control.
339-
if (read_paused)
338+
if (read_paused) {
340339
inbound_consumed_data_while_paused_ += avail;
341-
else {
340+
} else {
342341
IncrementStat(
343342
avail,
344343
&stream_stats_,

src/node_quic_stream.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum QuicStreamStatsIdx : int {
5555
// pair. QuicApplication implementations that support headers
5656
// per stream must create a specialization of the Header class.
5757
class QuicHeader {
58-
public:
58+
public:
5959
QuicHeader() {}
6060

6161
virtual ~QuicHeader() {}

src/node_quic_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ struct QuicError {
8888
inline QuicError(
8989
int32_t family_ = QUIC_ERROR_SESSION,
9090
uint64_t code_ = NGTCP2_NO_ERROR);
91-
inline QuicError(ngtcp2_connection_close_error_code code);
91+
explicit inline QuicError(ngtcp2_connection_close_error_code code);
9292
inline QuicError(
9393
Environment* env,
9494
v8::Local<v8::Value> codeArg,

src/node_sockaddr-inl.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
namespace node {
1414

15-
namespace {
1615
// Fun hash combine trick based on a variadic template that
1716
// I came across a while back but can't remember where. Will add an attribution
1817
// if I can find the source.
@@ -23,7 +22,6 @@ inline void hash_combine(size_t* seed, const T& value, Args... rest) {
2322
*seed ^= std::hash<T>{}(value) + 0x9e3779b9 + (*seed << 6) + (*seed >> 2);
2423
hash_combine(seed, rest...);
2524
}
26-
} // namespace
2725

2826
size_t SocketAddress::Hash::operator()(const sockaddr* addr) const {
2927
size_t hash = 0;

0 commit comments

Comments
 (0)