diff options
author | vjpai <vpai@google.com> | 2016-01-07 10:20:46 -0800 |
---|---|---|
committer | vjpai <vpai@google.com> | 2016-01-07 10:20:46 -0800 |
commit | de332dfcac51e080e4c294d183906e5969672133 (patch) | |
tree | 0cab8680a3c7cd108eebc139cb207fbcd912f49d /src | |
parent | 18c0477528169c2032a57b5da094964a6d4beb2f (diff) |
Refactor server side to support generic tests.
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 467f0007de..91e202023c 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -89,4 +89,10 @@ ByteBuffer::ByteBuffer(const ByteBuffer& buf): buffer_(grpc_byte_buffer_copy(buf.buffer_)) { } +ByteBuffer& ByteBuffer::operator=(const ByteBuffer& buf) { + Clear(); // first remove existing data + buffer_ = grpc_byte_buffer_copy(buf.buffer_); // then copy + return *this; +} + } // namespace grpc |