diff options
author | 2015-03-17 10:49:39 -0700 | |
---|---|---|
committer | 2015-03-17 10:49:39 -0700 | |
commit | 6baa9b67ada4f0abadd27a830778463f3e8aabd3 (patch) | |
tree | aa2c06f9261e2047ac41c726ba74b7c7b107c757 /src/cpp/server/async_server_context.cc | |
parent | 09eaec027ab4b3d97cb239820af98fe0c460f287 (diff) |
clang-format c++ code
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 f21efcfb19..628822a338 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,22 +52,22 @@ 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_old(call_, cq, this) == GRPC_CALL_OK); GPR_ASSERT(grpc_call_server_end_initial_metadata_old( call_, GRPC_WRITE_BUFFER_HINT) == GRPC_CALL_OK); } -bool AsyncServerContext::StartRead(grpc::protobuf::Message *request) { +bool AsyncServerContext::StartRead(grpc::protobuf::Message* request) { GPR_ASSERT(request); request_ = request; grpc_call_error err = grpc_call_start_read_old(call_, this); return err == GRPC_CALL_OK; } -bool AsyncServerContext::StartWrite(const grpc::protobuf::Message &response, +bool AsyncServerContext::StartWrite(const grpc::protobuf::Message& response, int flags) { - grpc_byte_buffer *buffer = nullptr; + grpc_byte_buffer* buffer = nullptr; if (!SerializeProto(response, &buffer)) { return false; } @@ -76,16 +76,16 @@ bool AsyncServerContext::StartWrite(const grpc::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_old( 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; |