Fix clang script errors

pull/19045/head
Karthik Ravi Shankar 6 years ago
parent 772a74aced
commit 3996599392
  1. 23
      include/grpcpp/channel.h
  2. 3
      include/grpcpp/impl/codegen/client_context.h
  3. 25
      src/cpp/client/channel_cc.cc
  4. 4
      src/cpp/client/client_context.cc
  5. 4
      src/cpp/client/create_channel_internal.cc
  6. 4
      src/cpp/client/create_channel_internal.h

@ -72,28 +72,28 @@ class Channel final : public ChannelInterface,
interceptor_creators);
friend class internal::InterceptedChannel;
Channel(const grpc::string& host, grpc_channel* c_channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
internal::Call CreateCall(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq) override;
ClientContext* context,
CompletionQueue* cq) override;
void PerformOpsOnCall(internal::CallOpSetInterface* ops,
internal::Call* call) override;
void* RegisterMethod(const char* method) override;
void NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline,
CompletionQueue* cq, void* tag) override;
gpr_timespec deadline, CompletionQueue* cq,
void* tag) override;
bool WaitForStateChangeImpl(grpc_connectivity_state last_observed,
gpr_timespec deadline) override;
CompletionQueue* CallbackCQ() override;
internal::Call CreateCallInternal(
const internal::RpcMethod& method, ClientContext* context,
CompletionQueue* cq, size_t interceptor_pos) override;
internal::Call CreateCallInternal(const internal::RpcMethod& method,
ClientContext* context, CompletionQueue* cq,
size_t interceptor_pos) override;
const grpc::string host_;
grpc_channel* const c_channel_; // owned
@ -107,11 +107,10 @@ class Channel final : public ChannelInterface,
// shutdown callback tag (invoked when the CQ is fully shutdown).
CompletionQueue* callback_cq_ = nullptr;
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
std::vector<std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators_;
};
} // namespace grpc_impl
} // namespace grpc
#endif // GRPCPP_CHANNEL_IMPL_H

@ -430,8 +430,7 @@ class ClientContext {
}
grpc_call* call() const { return call_; }
void set_call(grpc_call* call,
const std::shared_ptr<Channel>& channel);
void set_call(grpc_call* call, const std::shared_ptr<Channel>& channel);
experimental::ClientRpcInfo* set_client_rpc_info(
const char* method, internal::RpcMethod::RpcType type,

@ -45,10 +45,11 @@
namespace grpc {
static internal::GrpcLibraryInitializer g_gli_initializer;
Channel::Channel(const grpc::string& host, grpc_channel* channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>
interceptor_creators)
Channel::Channel(
const grpc::string& host, grpc_channel* channel,
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators)
: host_(host), c_channel_(channel) {
interceptor_creators_ = std::move(interceptor_creators);
g_gli_initializer.summon();
@ -64,8 +65,7 @@ Channel::~Channel() {
namespace {
inline grpc_slice SliceFromArray(const char* arr, size_t len) {
return g_core_codegen_interface->grpc_slice_from_copied_buffer(arr,
len);
return g_core_codegen_interface->grpc_slice_from_copied_buffer(arr, len);
}
grpc::string GetChannelInfoField(grpc_channel* channel,
@ -103,9 +103,10 @@ void ChannelResetConnectionBackoff(Channel* channel) {
} // namespace experimental
internal::Call Channel::CreateCallInternal(
const internal::RpcMethod& method, ClientContext* context,
CompletionQueue* cq, size_t interceptor_pos) {
internal::Call Channel::CreateCallInternal(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq,
size_t interceptor_pos) {
const bool kRegistered = method.channel_tag() && context->authority().empty();
grpc_call* c_call = nullptr;
if (kRegistered) {
@ -149,9 +150,9 @@ internal::Call Channel::CreateCallInternal(
return internal::Call(c_call, this, cq, info);
}
::grpc::internal::Call Channel::CreateCall(
const internal::RpcMethod& method, ClientContext* context,
CompletionQueue* cq) {
::grpc::internal::Call Channel::CreateCall(const internal::RpcMethod& method,
ClientContext* context,
CompletionQueue* cq) {
return CreateCallInternal(method, context, cq, 0);
}

@ -83,8 +83,8 @@ void ClientContext::AddMetadata(const grpc::string& meta_key,
send_initial_metadata_.insert(std::make_pair(meta_key, meta_value));
}
void ClientContext::set_call(
grpc_call* call, const std::shared_ptr<Channel>& channel) {
void ClientContext::set_call(grpc_call* call,
const std::shared_ptr<Channel>& channel) {
grpc::internal::MutexLock lock(&mu_);
GPR_ASSERT(call_ == nullptr);
call_ = call;

@ -26,8 +26,8 @@ namespace grpc {
std::shared_ptr<Channel> CreateChannelInternal(
const grpc::string& host, grpc_channel* c_channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators) {
return std::shared_ptr<Channel>(
new Channel(host, c_channel, std::move(interceptor_creators)));

@ -30,8 +30,8 @@ namespace grpc {
std::shared_ptr<Channel> CreateChannelInternal(
const grpc::string& host, grpc_channel* c_channel,
std::vector<std::unique_ptr<
experimental::ClientInterceptorFactoryInterface>>
std::vector<
std::unique_ptr<experimental::ClientInterceptorFactoryInterface>>
interceptor_creators);
} // namespace grpc

Loading…
Cancel
Save