diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2020-01-09 11:38:19 +0100 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2020-01-09 11:38:19 +0100 |
commit | 8333e0359023138421cb195870a8f7be8150850d (patch) | |
tree | d72b3c7c3b12a209e3f6097873ab1f34dd2609b7 /test/packetmath.cpp | |
parent | e6fcee995b0083e5652c79957090684a47a727c3 (diff) |
Use data.data() instead of &data (since it is not obvious that Array is trivially copyable)
Diffstat (limited to 'test/packetmath.cpp')
-rw-r--r-- | test/packetmath.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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<unsigned char*>(&res), &data, sizeof(T)); + std::memcpy(reinterpret_cast<unsigned char*>(&res), data.data(), sizeof(T)); return res; } |