From 8c555fe5926f8d69bb62d2b8fd6e9e7494adc572 Mon Sep 17 00:00:00 2001 From: orignal Date: Tue, 14 Jan 2025 13:30:47 -0500 Subject: [PATCH] copy fragment faster --- libi2pd/TunnelEndpoint.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libi2pd/TunnelEndpoint.h b/libi2pd/TunnelEndpoint.h index 473e0024..79393efe 100644 --- a/libi2pd/TunnelEndpoint.h +++ b/libi2pd/TunnelEndpoint.h @@ -33,7 +33,7 @@ namespace tunnel struct Fragment { Fragment (bool last, uint64_t t, const uint8_t * buf, size_t size): - isLastFragment (last), receiveTime (t), data (buf, buf + size) {}; + isLastFragment (last), receiveTime (t), data (size) { memcpy (data.data(), buf, size); }; bool isLastFragment; uint64_t receiveTime; // milliseconds since epoch std::vector data;