Skip to content

Commit

Permalink
replace reinterpret_cast with copy_n
Browse files Browse the repository at this point in the history
On mips64, this throws a cast-align warning. Silence it.

Signed-off-by: Rosen Penev <[email protected]>
(cherry picked from commit 640282f)

# Conflicts:
#	src/pgfimage.cpp
  • Loading branch information
neheb authored and mergify[bot] committed Jul 17, 2023
1 parent e3f7509 commit 3288ed0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pgfimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ void PgfImage::doWriteMetadata(BasicIo& outIo) {
// Write new Header size.
auto newHeaderSize = static_cast<uint32_t>(header.size() + imgSize);
DataBuf buffer(4);
<<<<<<< HEAD
std::copy_n(&newHeaderSize, 4, buffer.data());
=======
std::copy_n(&newHeaderSize, sizeof(uint32_t), buffer.data());
>>>>>>> 640282f3 (replace reinterpret_cast with copy_n)
byteSwap_(buffer, 0, bSwap_);
if (outIo.write(buffer.c_data(), 4) != 4)
throw Error(ErrorCode::kerImageWriteFailed);
Expand Down

0 comments on commit 3288ed0

Please sign in to comment.