From 7fe758de85ab303de65c8bbb5a07e810324ed9ed Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Tue, 28 Jun 2016 21:21:21 +0200 Subject: [PATCH] src: fix readability/braces cpplint warnings PR-URL: https://github.com/nodejs/node/pull/7462 Reviewed-By: Trevor Norris --- src/cares_wrap.cc | 4 ++-- src/inspector_agent.cc | 10 +++++----- src/node_http_parser.cc | 4 ++-- src/node_watchdog.cc | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 88ce802dfec30e..f78fe52871fd0d 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -371,11 +371,11 @@ class QueryWrap : public AsyncWrap { // Subclasses should implement the appropriate Parse method. virtual void Parse(unsigned char* buf, int len) { UNREACHABLE(); - }; + } virtual void Parse(struct hostent* host) { UNREACHABLE(); - }; + } }; diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index 2d28f96be0b5f2..7cd7f4e5c944f4 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -575,23 +575,23 @@ Agent::~Agent() { void Agent::Start(v8::Platform* platform, int port, bool wait) { impl->Start(platform, port, wait); -}; +} void Agent::Stop() { impl->Stop(); -}; +} bool Agent::IsStarted() { return impl->IsStarted(); -}; +} bool Agent::IsConnected() { return impl->IsConnected(); -}; +} void Agent::WaitForDisconnect() { impl->WaitForDisconnect(); -}; +} } // namespace inspector } // namespace node diff --git a/src/node_http_parser.cc b/src/node_http_parser.cc index fd5e7c8e215cd1..f757cd6797058d 100644 --- a/src/node_http_parser.cc +++ b/src/node_http_parser.cc @@ -107,9 +107,9 @@ struct StringPtr { void Update(const char* str, size_t size) { - if (str_ == nullptr) + if (str_ == nullptr) { str_ = str; - else if (on_heap_ || str_ + size_ != str) { + } else if (on_heap_ || str_ + size_ != str) { // Non-consecutive input, make a copy on the heap. // TODO(bnoordhuis) Use slab allocation, O(n) allocs is bad. char* s = new char[size_ + size]; diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 8a067c27f3b6c2..9c776973a2d630 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -292,7 +292,7 @@ SigintWatchdogHelper::SigintWatchdogHelper() CHECK_EQ(0, uv_mutex_init(&mutex_)); CHECK_EQ(0, uv_mutex_init(&list_mutex_)); -}; +} SigintWatchdogHelper::~SigintWatchdogHelper() {