From b30bc2aad6438cf89c11569fac436c83a7133f4b Mon Sep 17 00:00:00 2001
From: Vijay Pai <vpai@google.com>
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 a089dbb4cb..d3f9b7b1d1 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<ByteBuffer, void>;
 
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc
index 91e202023c..5245739c89 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 4a915a7801..cce36933f6 100644
--- a/test/cpp/qps/client.h
+++ b/test/cpp/qps/client.h
@@ -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
     }
-- 
GitLab