diff options
author | 2015-01-18 14:36:47 -0800 | |
---|---|---|
committer | 2015-01-18 14:36:47 -0800 | |
commit | ecd49345b5c500b9ea1da70b15c90b87da3ff55a (patch) | |
tree | 29afa5d2986d5c85a93e126c1d1f1cd1213d82ab /src/cpp/server/async_server_context.cc | |
parent | cf1d6eb4ae1b48958454259f7e26bee9140cbf65 (diff) |
Use clang-format-3.5
Diffstat (limited to 'src/cpp/server/async_server_context.cc')
-rw-r--r-- | src/cpp/server/async_server_context.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cpp/server/async_server_context.cc b/src/cpp/server/async_server_context.cc index 298936dec9..92958111c0 100644 --- a/src/cpp/server/async_server_context.cc +++ b/src/cpp/server/async_server_context.cc @@ -42,7 +42,7 @@ namespace grpc { AsyncServerContext::AsyncServerContext( - grpc_call* call, const grpc::string& method, const grpc::string& host, + grpc_call *call, const grpc::string &method, const grpc::string &host, system_clock::time_point absolute_deadline) : method_(method), host_(host), @@ -52,21 +52,21 @@ AsyncServerContext::AsyncServerContext( AsyncServerContext::~AsyncServerContext() { grpc_call_destroy(call_); } -void AsyncServerContext::Accept(grpc_completion_queue* cq) { +void AsyncServerContext::Accept(grpc_completion_queue *cq) { GPR_ASSERT(grpc_call_server_accept(call_, cq, this) == GRPC_CALL_OK); GPR_ASSERT(grpc_call_server_end_initial_metadata(call_, 0) == GRPC_CALL_OK); } -bool AsyncServerContext::StartRead(google::protobuf::Message* request) { +bool AsyncServerContext::StartRead(google::protobuf::Message *request) { GPR_ASSERT(request); request_ = request; grpc_call_error err = grpc_call_start_read(call_, this); return err == GRPC_CALL_OK; } -bool AsyncServerContext::StartWrite(const google::protobuf::Message& response, +bool AsyncServerContext::StartWrite(const google::protobuf::Message &response, int flags) { - grpc_byte_buffer* buffer = nullptr; + grpc_byte_buffer *buffer = nullptr; if (!SerializeProto(response, &buffer)) { return false; } @@ -75,16 +75,16 @@ bool AsyncServerContext::StartWrite(const google::protobuf::Message& response, return err == GRPC_CALL_OK; } -bool AsyncServerContext::StartWriteStatus(const Status& status) { +bool AsyncServerContext::StartWriteStatus(const Status &status) { grpc_call_error err = grpc_call_start_write_status( call_, static_cast<grpc_status_code>(status.code()), status.details().empty() ? nullptr - : const_cast<char*>(status.details().c_str()), + : const_cast<char *>(status.details().c_str()), this); return err == GRPC_CALL_OK; } -bool AsyncServerContext::ParseRead(grpc_byte_buffer* read_buffer) { +bool AsyncServerContext::ParseRead(grpc_byte_buffer *read_buffer) { GPR_ASSERT(request_); bool success = DeserializeProto(read_buffer, request_); request_ = nullptr; |