From 0f95fa4909ba6f65364cb0b5c8c37a27c09b67b4 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Tue, 18 Jul 2017 10:42:33 -0700 Subject: Add idiomatic C++ API for grpc::Slice construction that doesn't require using grpc_slice --- test/cpp/qps/client.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'test/cpp/qps') diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index e759446c1a..ecbf9c31fa 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -88,9 +88,7 @@ class ClientRequestCreator { if (payload_config.has_bytebuf_params()) { std::unique_ptr buf( new char[payload_config.bytebuf_params().req_size()]); - grpc_slice s = grpc_slice_from_copied_buffer( - buf.get(), payload_config.bytebuf_params().req_size()); - Slice slice(s, Slice::STEAL_REF); + Slice slice(buf.get(), payload_config.bytebuf_params().req_size()); *req = ByteBuffer(&slice, 1); } else { GPR_ASSERT(false); // not appropriate for this specialization -- cgit v1.2.3