From b30bc2aad6438cf89c11569fac436c83a7133f4b Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 11 Jan 2016 10:11:50 -0800 Subject: [PATCH] Remove dead code and a thus unneeded change to C++ bbuf --- include/grpc++/support/byte_buffer.h | 3 --- src/cpp/util/byte_buffer.cc | 6 ------ test/cpp/qps/client.h | 2 -- 3 files changed, 11 deletions(-) diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index a089dbb4cb5..d3f9b7b1d1f 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -72,9 +72,6 @@ class ByteBuffer GRPC_FINAL { /// Buffer size in bytes. size_t Length() const; - /// Move contents from \a bbuf and clear \a bbuf - void MoveFrom(ByteBuffer* bbuf); - private: friend class SerializationTraits; diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index 91e202023c5..5245739c89b 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -79,12 +79,6 @@ size_t ByteBuffer::Length() const { } } -void ByteBuffer::MoveFrom(ByteBuffer* bbuf) { - Clear(); // in case we already had something, but we shouldn't use this then - buffer_ = bbuf->buffer_; - bbuf->buffer_ = nullptr; -} - ByteBuffer::ByteBuffer(const ByteBuffer& buf): buffer_(grpc_byte_buffer_copy(buf.buffer_)) { } diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 4a915a7801a..cce36933f6c 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -118,8 +118,6 @@ class ClientRequestCreator { buf.get(), payload_config.bytebuf_params().req_size()); Slice slice(s, Slice::STEAL_REF); *req = ByteBuffer(&slice, 1); - // std::unique_ptr bbuf(new ByteBuffer(&slice, 1)); - // req->MoveFrom(bbuf.get()); } else { GPR_ASSERT(false); // not appropriate for this specialization }