Remove dead code and a thus unneeded change to C++ bbuf

pull/4670/head
Vijay Pai 9 years ago
parent 6045681003
commit b30bc2aad6
  1. 3
      include/grpc++/support/byte_buffer.h
  2. 6
      src/cpp/util/byte_buffer.cc
  3. 2
      test/cpp/qps/client.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<ByteBuffer, void>;

@ -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_)) {
}

@ -118,8 +118,6 @@ class ClientRequestCreator<ByteBuffer> {
buf.get(), payload_config.bytebuf_params().req_size());
Slice slice(s, Slice::STEAL_REF);
*req = ByteBuffer(&slice, 1);
// std::unique_ptr<ByteBuffer> bbuf(new ByteBuffer(&slice, 1));
// req->MoveFrom(bbuf.get());
} else {
GPR_ASSERT(false); // not appropriate for this specialization
}

Loading…
Cancel
Save