Skip to content

Commit 7063c59

Browse files
committed
cpplint: disallow comma-first in C++
1 parent a2d1cbe commit 7063c59

12 files changed

Lines changed: 86 additions & 83 deletions

src/env-inl.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ inline void Environment::IsolateData::Put() {
5252
}
5353

5454
inline Environment::IsolateData::IsolateData(v8::Isolate* isolate)
55-
: event_loop_(uv_default_loop())
56-
, isolate_(isolate)
55+
: event_loop_(uv_default_loop()),
56+
isolate_(isolate),
5757
#define V(PropertyName, StringValue) \
58-
, PropertyName ## _index_( \
59-
FIXED_ONE_BYTE_STRING(isolate, StringValue).Eternalize(isolate))
58+
PropertyName ## _index_( \
59+
FIXED_ONE_BYTE_STRING(isolate, StringValue).Eternalize(isolate)),
6060
PER_ISOLATE_STRING_PROPERTIES(V)
6161
#undef V
62-
, ref_count_(0) {
62+
ref_count_(0) {
6363
}
6464

6565
inline uv_loop_t* Environment::IsolateData::event_loop() const {
@@ -155,11 +155,11 @@ inline Environment* Environment::GetCurrentChecked(
155155
}
156156

157157
inline Environment::Environment(v8::Local<v8::Context> context)
158-
: isolate_(context->GetIsolate())
159-
, isolate_data_(IsolateData::GetOrCreate(context->GetIsolate()))
160-
, using_smalloc_alloc_cb_(false)
161-
, using_domains_(false)
162-
, context_(context->GetIsolate(), context) {
158+
: isolate_(context->GetIsolate()),
159+
isolate_data_(IsolateData::GetOrCreate(context->GetIsolate())),
160+
using_smalloc_alloc_cb_(false),
161+
using_domains_(false),
162+
context_(context->GetIsolate(), context) {
163163
// We'll be creating new objects so make sure we've entered the context.
164164
v8::Context::Scope context_scope(context);
165165
v8::HandleScope handle_scope(isolate());

src/handle_wrap.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ void HandleWrap::Close(const FunctionCallbackInfo<Value>& args) {
8989
HandleWrap::HandleWrap(Environment* env,
9090
Handle<Object> object,
9191
uv_handle_t* handle)
92-
: env_(env)
93-
, flags_(0)
94-
, handle__(handle) {
92+
: env_(env),
93+
flags_(0),
94+
handle__(handle) {
9595
handle__->data = this;
9696
HandleScope scope(node_isolate);
9797
persistent().Reset(node_isolate, object);

src/node_contextify.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ class ContextifyContext {
6464

6565
public:
6666
explicit ContextifyContext(Environment* env, Local<Object> sandbox)
67-
: env_(env)
68-
, sandbox_(env->isolate(), sandbox)
69-
, context_(env->isolate(), CreateV8Context(env))
70-
, proxy_global_(env->isolate(), context()->Global())
67+
: env_(env),
68+
sandbox_(env->isolate(), sandbox),
69+
context_(env->isolate(), CreateV8Context(env)),
70+
proxy_global_(env->isolate(), context()->Global()),
7171
// Wait for sandbox_, proxy_global_, and context_ to die
72-
, references_(3) {
72+
references_(3) {
7373
sandbox_.MakeWeak(this, WeakCallback);
7474
sandbox_.MarkIndependent();
7575
context_.MakeWeak(this, WeakCallback);

src/node_crypto.h

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ class SecureContext : public WeakObject {
9494
static void SetTicketKeys(const v8::FunctionCallbackInfo<v8::Value>& args);
9595

9696
SecureContext(Environment* env, v8::Local<v8::Object> wrap)
97-
: WeakObject(env->isolate(), wrap)
98-
, ca_store_(NULL)
99-
, ctx_(NULL)
100-
, env_(env) {
97+
: WeakObject(env->isolate(), wrap),
98+
ca_store_(NULL),
99+
ctx_(NULL),
100+
env_(env) {
101101
}
102102

103103
void FreeCTXMem() {
@@ -134,10 +134,10 @@ class SSLWrap {
134134
};
135135

136136
SSLWrap(Environment* env, SecureContext* sc, Kind kind)
137-
: env_(env)
138-
, kind_(kind)
139-
, next_sess_(NULL)
140-
, session_callbacks_(false) {
137+
: env_(env),
138+
kind_(kind),
139+
next_sess_(NULL),
140+
session_callbacks_(false) {
141141
ssl_ = SSL_new(sc->ctx_);
142142
assert(ssl_ != NULL);
143143
}
@@ -285,11 +285,11 @@ class Connection : public SSLWrap<Connection>, public WeakObject {
285285
v8::Local<v8::Object> wrap,
286286
SecureContext* sc,
287287
SSLWrap<Connection>::Kind kind)
288-
: SSLWrap<Connection>(env, sc, kind)
289-
, WeakObject(env->isolate(), wrap)
290-
, bio_read_(NULL)
291-
, bio_write_(NULL)
292-
, hello_offset_(0) {
288+
: SSLWrap<Connection>(env, sc, kind),
289+
WeakObject(env->isolate(), wrap),
290+
bio_read_(NULL),
291+
bio_write_(NULL),
292+
hello_offset_(0) {
293293
hello_parser_.Start(SSLWrap<Connection>::OnClientHello,
294294
OnClientHelloParseEnd,
295295
this);
@@ -347,10 +347,10 @@ class CipherBase : public WeakObject {
347347
CipherBase(v8::Isolate* isolate,
348348
v8::Local<v8::Object> wrap,
349349
CipherKind kind)
350-
: WeakObject(isolate, wrap)
351-
, cipher_(NULL)
352-
, initialised_(false)
353-
, kind_(kind) {
350+
: WeakObject(isolate, wrap),
351+
cipher_(NULL),
352+
initialised_(false),
353+
kind_(kind) {
354354
}
355355

356356
~CipherBase() {
@@ -380,9 +380,9 @@ class Hmac : public WeakObject {
380380
static void HmacDigest(const v8::FunctionCallbackInfo<v8::Value>& args);
381381

382382
Hmac(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
383-
: WeakObject(isolate, wrap)
384-
, md_(NULL)
385-
, initialised_(false) {
383+
: WeakObject(isolate, wrap),
384+
md_(NULL),
385+
initialised_(false) {
386386
}
387387

388388
~Hmac() {
@@ -409,9 +409,9 @@ class Hash : public WeakObject {
409409
static void HashDigest(const v8::FunctionCallbackInfo<v8::Value>& args);
410410

411411
Hash(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
412-
: WeakObject(isolate, wrap)
413-
, md_(NULL)
414-
, initialised_(false) {
412+
: WeakObject(isolate, wrap),
413+
md_(NULL),
414+
initialised_(false) {
415415
}
416416

417417
~Hash() {
@@ -443,9 +443,9 @@ class Sign : public WeakObject {
443443
static void SignFinal(const v8::FunctionCallbackInfo<v8::Value>& args);
444444

445445
Sign(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
446-
: WeakObject(isolate, wrap)
447-
, md_(NULL)
448-
, initialised_(false) {
446+
: WeakObject(isolate, wrap),
447+
md_(NULL),
448+
initialised_(false) {
449449
}
450450

451451
~Sign() {
@@ -477,9 +477,9 @@ class Verify : public WeakObject {
477477
static void VerifyFinal(const v8::FunctionCallbackInfo<v8::Value>& args);
478478

479479
Verify(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
480-
: WeakObject(isolate, wrap)
481-
, md_(NULL)
482-
, initialised_(false) {
480+
: WeakObject(isolate, wrap),
481+
md_(NULL),
482+
initialised_(false) {
483483
}
484484

485485
~Verify() {
@@ -515,9 +515,9 @@ class DiffieHellman : public WeakObject {
515515
static void SetPrivateKey(const v8::FunctionCallbackInfo<v8::Value>& args);
516516

517517
DiffieHellman(v8::Isolate* isolate, v8::Local<v8::Object> wrap)
518-
: WeakObject(isolate, wrap)
519-
, initialised_(false)
520-
, dh(NULL) {
518+
: WeakObject(isolate, wrap),
519+
initialised_(false),
520+
dh(NULL) {
521521
}
522522

523523
~DiffieHellman() {

src/node_file.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ using v8::Value;
6767
class FSReqWrap: public ReqWrap<uv_fs_t> {
6868
public:
6969
FSReqWrap(Environment* env, const char* syscall, char* data = NULL)
70-
: ReqWrap<uv_fs_t>(env)
71-
, syscall_(syscall)
72-
, data_(data) {
70+
: ReqWrap<uv_fs_t>(env),
71+
syscall_(syscall),
72+
data_(data) {
7373
}
7474

7575
void ReleaseEarly() {

src/node_http_parser.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ struct StringPtr {
190190
class Parser : public WeakObject {
191191
public:
192192
Parser(Environment* env, Local<Object> wrap, enum http_parser_type type)
193-
: WeakObject(env->isolate(), wrap)
194-
, env_(env)
195-
, current_buffer_len_(0)
196-
, current_buffer_data_(NULL) {
193+
: WeakObject(env->isolate(), wrap),
194+
env_(env),
195+
current_buffer_len_(0),
196+
current_buffer_data_(NULL) {
197197
Init(type);
198198
}
199199

src/node_stat_watcher.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ static void Delete(uv_handle_t* handle) {
6464

6565

6666
StatWatcher::StatWatcher(Environment* env, Local<Object> wrap)
67-
: WeakObject(env->isolate(), wrap)
68-
, watcher_(new uv_fs_poll_t)
69-
, env_(env) {
67+
: WeakObject(env->isolate(), wrap),
68+
watcher_(new uv_fs_poll_t),
69+
env_(env) {
7070
uv_fs_poll_init(env->event_loop(), watcher_);
7171
watcher_->data = static_cast<void*>(this);
7272
}

src/node_zlib.cc

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -71,21 +71,21 @@ class ZCtx : public WeakObject {
7171
public:
7272

7373
ZCtx(Environment* env, Local<Object> wrap, node_zlib_mode mode)
74-
: WeakObject(env->isolate(), wrap)
75-
, chunk_size_(0)
76-
, dictionary_(NULL)
77-
, dictionary_len_(0)
78-
, env_(env)
79-
, err_(0)
80-
, flush_(0)
81-
, init_done_(false)
82-
, level_(0)
83-
, memLevel_(0)
84-
, mode_(mode)
85-
, strategy_(0)
86-
, windowBits_(0)
87-
, write_in_progress_(false)
88-
, refs_(0) {
74+
: WeakObject(env->isolate(), wrap),
75+
chunk_size_(0),
76+
dictionary_(NULL),
77+
dictionary_len_(0),
78+
env_(env),
79+
err_(0),
80+
flush_(0),
81+
init_done_(false),
82+
level_(0),
83+
memLevel_(0),
84+
mode_(mode),
85+
strategy_(0),
86+
windowBits_(0),
87+
write_in_progress_(false),
88+
refs_(0) {
8989
}
9090

9191

src/stream_wrap.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ using v8::Value;
5454
StreamWrap::StreamWrap(Environment* env,
5555
Local<Object> object,
5656
uv_stream_t* stream)
57-
: HandleWrap(env, object, reinterpret_cast<uv_handle_t*>(stream))
58-
, stream_(stream)
59-
, default_callbacks_(this)
60-
, callbacks_(&default_callbacks_) {
57+
: HandleWrap(env, object, reinterpret_cast<uv_handle_t*>(stream)),
58+
stream_(stream),
59+
default_callbacks_(this),
60+
callbacks_(&default_callbacks_) {
6161
}
6262

6363

src/stream_wrap.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ typedef class ReqWrap<uv_shutdown_t> ShutdownWrap;
3838
class WriteWrap: public ReqWrap<uv_write_t> {
3939
public:
4040
WriteWrap(Environment* env, v8::Local<v8::Object> obj, StreamWrap* wrap)
41-
: ReqWrap<uv_write_t>(env, obj)
42-
, wrap_(wrap) {
41+
: ReqWrap<uv_write_t>(env, obj),
42+
wrap_(wrap) {
4343
}
4444

4545
void* operator new(size_t size, char* storage) { return storage; }

0 commit comments

Comments
 (0)