From 8333e0359023138421cb195870a8f7be8150850d Mon Sep 17 00:00:00 2001 From: Christoph Hertzberg Date: Thu, 9 Jan 2020 11:38:19 +0100 Subject: [PATCH] Use data.data() instead of &data (since it is not obvious that Array is trivially copyable) --- test/packetmath.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/packetmath.cpp b/test/packetmath.cpp index ba250443a..f81c07e40 100644 --- a/test/packetmath.cpp +++ b/test/packetmath.cpp @@ -44,7 +44,7 @@ T apply_bit_op(Bits a, Bits b, Func f) { for(Index i = 0; i < data.size(); ++i) data[i] = f(a[i], b[i]); // Note: The reinterpret_cast works around GCC's class-memaccess warnings: - std::memcpy(reinterpret_cast(&res), &data, sizeof(T)); + std::memcpy(reinterpret_cast(&res), data.data(), sizeof(T)); return res; }