Make SliceFromArray() static in channel_cc.cc.

Also, use `context->authority_` instead of `context->authority()`
for consistency.
pull/16699/head
Soheil Hassas Yeganeh 6 years ago
parent 369cfe118c
commit 80ce1865d7
  1. 4
      include/grpcpp/impl/codegen/slice.h
  2. 6
      src/cpp/client/channel_cc.cc

@ -138,10 +138,6 @@ inline grpc_slice SliceFromCopiedString(const grpc::string& str) {
str.length());
}
inline grpc_slice SliceFromArray(const char* arr, size_t len) {
return g_core_codegen_interface->grpc_slice_from_copied_buffer(arr, len);
}
} // namespace grpc
#endif // GRPCPP_IMPL_CODEGEN_SLICE_H

@ -65,6 +65,10 @@ 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);
}
grpc::string GetChannelInfoField(grpc_channel* channel,
grpc_channel_info* channel_info,
char*** channel_info_field) {
@ -112,7 +116,7 @@ internal::Call Channel::CreateCall(const internal::RpcMethod& method,
method.channel_tag(), context->raw_deadline(), nullptr);
} else {
const string* host_str = nullptr;
if (!context->authority().empty()) {
if (!context->authority_.empty()) {
host_str = &context->authority_;
} else if (!host_.empty()) {
host_str = &host_;

Loading…
Cancel
Save