diff options
author | Vijay Pai <vpai@google.com> | 2017-07-18 10:42:33 -0700 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2017-07-18 11:07:43 -0700 |
commit | 0f95fa4909ba6f65364cb0b5c8c37a27c09b67b4 (patch) | |
tree | a98b582aa9e26d6aca4a3e23e8a4ab9dfe883ec3 /test/cpp/qps/client.h | |
parent | c39d4c16a02d49a1e4b090309786643045287639 (diff) |
Add idiomatic C++ API for grpc::Slice construction that doesn't
require using grpc_slice
Diffstat (limited to 'test/cpp/qps/client.h')
-rw-r--r-- | test/cpp/qps/client.h | 4 |
1 files changed, 1 insertions, 3 deletions
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<ByteBuffer> { if (payload_config.has_bytebuf_params()) { std::unique_ptr<char[]> 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 |