Skip to content

Commit

Permalink
rev: rewrite std::memcpy call in copy_from
Browse files Browse the repository at this point in the history
Co-authored-by: Phil Miller - NOAA <[email protected]>
  • Loading branch information
program-- and PhilMiller authored Jul 11, 2023
1 parent bfda5bb commit 41560fa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/utilities/EndianCopy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace utils {
template<typename S>
void copy_from(const std::vector<uint8_t>& src, int& index, S& dst, uint8_t order)
{
std::memcpy(&dst, &src[index], sizeof(S));
std::memcpy(&dst, src.data() + index, sizeof(dst));

if (order == 0x01) {
boost::endian::little_to_native_inplace(dst);
Expand Down

0 comments on commit 41560fa

Please sign in to comment.