mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-11-09 10:00:57 +03:00
Custom variant type for packetheader
Summary: Make a custom variant type for PacketHeader. By not relying on boost::variant this reduces the code size of the implementation. This uses a combination of a union type as well as a enum type to emulate a variant Reviewed By: yangchi Differential Revision: D17187589 fbshipit-source-id: 00c2b9b8dd3f3e73af766d84888b13b9d867165a
This commit is contained in:
committed by
Facebook Github Bot
parent
c8da36d755
commit
04baa15a04
@@ -50,7 +50,7 @@ TEST_F(QLoggerTest, TestRegularWritePacket) {
|
||||
TEST_F(QLoggerTest, TestRegularPacket) {
|
||||
auto headerIn =
|
||||
ShortHeader(ProtectionType::KeyPhaseZero, getTestConnectionId(1), 1);
|
||||
RegularQuicPacket regularQuicPacket(headerIn);
|
||||
RegularQuicPacket regularQuicPacket(std::move(headerIn));
|
||||
ReadStreamFrame frame(streamId, offset, fin);
|
||||
|
||||
regularQuicPacket.frames.emplace_back(std::move(frame));
|
||||
@@ -341,7 +341,7 @@ TEST_F(QLoggerTest, QLoggerFollyDynamic) {
|
||||
|
||||
auto headerIn =
|
||||
ShortHeader(ProtectionType::KeyPhaseZero, getTestConnectionId(1), 1);
|
||||
RegularQuicPacket regularQuicPacket(headerIn);
|
||||
RegularQuicPacket regularQuicPacket(std::move(headerIn));
|
||||
ReadStreamFrame frame(streamId, offset, fin);
|
||||
|
||||
regularQuicPacket.frames.emplace_back(std::move(frame));
|
||||
@@ -384,7 +384,7 @@ TEST_F(QLoggerTest, RegularPacketFollyDynamic) {
|
||||
|
||||
auto headerIn =
|
||||
ShortHeader(ProtectionType::KeyPhaseZero, getTestConnectionId(1), 1);
|
||||
RegularQuicPacket regularQuicPacket(headerIn);
|
||||
RegularQuicPacket regularQuicPacket(std::move(headerIn));
|
||||
ReadStreamFrame frame(streamId, offset, fin);
|
||||
|
||||
regularQuicPacket.frames.emplace_back(std::move(frame));
|
||||
|
||||
Reference in New Issue
Block a user