Skip to content

Commit f0f9690

Browse files
Aman Sharmameta-codesync[bot]
authored andcommitted
Add default constructor to QuicBuffer
Summary: This diff adds a default constructor to QuicBuffer that behaves similarly to folly::IOBuf's default constructor. This is used in `InplaceQuicPacketBuilder::buildPacket` where the else branch is the fallback for cases where no header/body spans were established (e.g. the builder never wrote out the header or payload), so we release the borrowed buffer and return a packet with default-constructed Buf()s. Reviewed By: jbeshay Differential Revision: D85726178 fbshipit-source-id: 249cb3042052221a09afc9230a87d4bea34e07d3
1 parent cd52304 commit f0f9690

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quic/common/QuicBuffer.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ class QuicBuffer {
2424
CREATE = 0,
2525
};
2626

27+
QuicBuffer() : next_(this), prev_(this) {}
28+
2729
explicit QuicBuffer(std::size_t capacity);
2830

2931
// Same as the previous constructor, just added the CreateOp

0 commit comments

Comments
 (0)