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

src: fix lint-cpp issues #224

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/node_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "tls_wrap.h" // TLSWrap

#include "async_wrap-inl.h"
#include "base_object-inl.h"
#include "env-inl.h"
#include "memory_tracker-inl.h"
#include "string_bytes.h"
Expand Down
1 change: 0 additions & 1 deletion src/node_crypto_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ namespace node {
using v8::Array;
using v8::Context;
using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::Object;
using v8::Value;
Expand Down
3 changes: 0 additions & 3 deletions src/node_quic_crypto.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@
namespace node {

using crypto::EntropySource;
using v8::Array;
using v8::Integer;
using v8::Local;
using v8::Object;
using v8::String;
using v8::Value;

Expand Down
3 changes: 1 addition & 2 deletions src/node_quic_http3_application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ namespace node {

using v8::Eternal;
using v8::MaybeLocal;
using v8::Number;
using v8::String;
using v8::Value;

Expand Down Expand Up @@ -510,7 +509,7 @@ bool Http3Application::SendPendingData() {
// }
// continue;
}
//Session()->SetLastError(QUIC_ERROR_APPLICATION, nwrite);
// Session()->SetLastError(QUIC_ERROR_APPLICATION, nwrite);
return false;
}

Expand Down
1 change: 0 additions & 1 deletion src/node_quic_session.cc
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,6 @@ void JSQuicSessionListener::OnSessionTicket(int size, SSL_SESSION* session) {
Session()->MakeCallback(
env->quic_on_session_ticket_function(),
arraysize(argv), argv);

}

void JSQuicSessionListener::OnSessionSilentClose(
Expand Down
3 changes: 1 addition & 2 deletions src/node_quic_socket.cc
Original file line number Diff line number Diff line change
Expand Up @@ -599,8 +599,7 @@ bool QuicSocket::SendStatelessReset(
NGTCP2_MAX_PKTLEN_IPV4,
token,
random,
RANDLEN
);
RANDLEN);
if (nwrite <= 0)
return false;
buf.Realloc(nwrite);
Expand Down
5 changes: 2 additions & 3 deletions src/node_quic_stream.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ using v8::Array;
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::FunctionTemplate;
using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::Object;
Expand Down Expand Up @@ -336,9 +335,9 @@ void QuicStream::ReceiveData(
// Reading can be paused while we are processing. If that's
// the case, we still want to acknowledge the current bytes
// so that pausing does not throw off our flow control.
if (read_paused)
if (read_paused) {
inbound_consumed_data_while_paused_ += avail;
else {
} else {
IncrementStat(
avail,
&stream_stats_,
Expand Down
2 changes: 1 addition & 1 deletion src/node_quic_stream.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ enum QuicStreamStatsIdx : int {
// pair. QuicApplication implementations that support headers
// per stream must create a specialization of the Header class.
class QuicHeader {
public:
public:
QuicHeader() {}

virtual ~QuicHeader() {}
Expand Down
2 changes: 1 addition & 1 deletion src/node_quic_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ struct QuicError {
inline QuicError(
int32_t family_ = QUIC_ERROR_SESSION,
uint64_t code_ = NGTCP2_NO_ERROR);
inline QuicError(ngtcp2_connection_close_error_code code);
explicit inline QuicError(ngtcp2_connection_close_error_code code);
inline QuicError(
Environment* env,
v8::Local<v8::Value> codeArg,
Expand Down
2 changes: 0 additions & 2 deletions src/node_sockaddr-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace node {

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

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