From ea87dfb71134128a3bb32fe8bff3a5e75acbba93 Mon Sep 17 00:00:00 2001 From: murgatroid99 <mlumish@google.com> Date: Tue, 25 Apr 2017 12:51:40 -0700 Subject: [PATCH] Clang format --- src/node/ext/server.cc | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/node/ext/server.cc b/src/node/ext/server.cc index 962a25d12a..a885a9f268 100644 --- a/src/node/ext/server.cc +++ b/src/node/ext/server.cc @@ -81,22 +81,14 @@ static Callback *shutdown_callback = NULL; class ServerShutdownOp : public Op { public: - ServerShutdownOp(grpc_server *server): server(server) { - } + ServerShutdownOp(grpc_server *server) : server(server) {} - ~ServerShutdownOp() { - } + ~ServerShutdownOp() {} - Local<Value> GetNodeValue() const { - return Nan::Null(); - } + Local<Value> GetNodeValue() const { return Nan::Null(); } - bool ParseOp(Local<Value> value, grpc_op *out) { - return true; - } - bool IsFinalOp() { - return false; - } + bool ParseOp(Local<Value> value, grpc_op *out) { return true; } + bool IsFinalOp() { return false; } void OnComplete(bool success) { /* Because cancel_all_calls was called, we assume that shutdown_and_notify completes successfully */ @@ -180,12 +172,9 @@ class TryShutdownOp : public Op { server_persist; }; -Server::Server(grpc_server *server) : wrapped_server(server) { -} +Server::Server(grpc_server *server) : wrapped_server(server) {} -Server::~Server() { - this->ShutdownServer(); -} +Server::~Server() { this->ShutdownServer(); } void Server::Init(Local<Object> exports) { HandleScope scope; @@ -225,10 +214,10 @@ void Server::ShutdownServer() { Nan::HandleScope scope; if (this->wrapped_server != NULL) { if (shutdown_callback == NULL) { - Local<FunctionTemplate>callback_tpl = + Local<FunctionTemplate> callback_tpl = Nan::New<FunctionTemplate>(ServerShutdownCallback); - shutdown_callback = new Callback( - Nan::GetFunction(callback_tpl).ToLocalChecked()); + shutdown_callback = + new Callback(Nan::GetFunction(callback_tpl).ToLocalChecked()); } ServerShutdownOp *op = new ServerShutdownOp(this->wrapped_server); -- GitLab