diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpp/util/byte_buffer.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index 755234d7e8..4d73599542 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -79,4 +79,10 @@ 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; +} + } // namespace grpc |