aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2016-08-18 08:02:24 -0700
committerGravatar Mark D. Roth <roth@google.com>2016-08-18 08:02:24 -0700
commit2665bdd6d29ec2515946ac629002c04c23a50bfa (patch)
treeb44362872edddcd8b9bcc137a9f06fa06f6788ba /include
parent5c648dc537121d8ffffbdcf972bb499d47eba000 (diff)
Reduce allocations associated with src/cpp/util/byte_buffer.cc.
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/support/byte_buffer.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h
index 20bd407109..01249a0b88 100644
--- a/include/grpc++/support/byte_buffer.h
+++ b/include/grpc++/support/byte_buffer.h
@@ -72,6 +72,9 @@ class ByteBuffer GRPC_FINAL {
/// Buffer size in bytes.
size_t Length() const;
+ /// Swap the state of *this and *other.
+ void Swap(ByteBuffer* other);
+
private:
friend class SerializationTraits<ByteBuffer, void>;