Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
Quiet narrowing conversion warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
jboone committed Feb 22, 2016
1 parent 1960946 commit 36c38e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/common/png_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ void PNGWriter::write_scanline(const std::array<ui::ColorRGB888, 240>& scanline)
constexpr uint32_t deflate_block_length = 1 + sizeof(scanline);

const std::array<uint8_t, 6> deflate_and_scanline_header {
(scanline_count == (height - 1)) ? 0x01 : 0x00, // DEFLATE header bits, bfinal=0, btype=00
static_cast<uint8_t>((scanline_count == (height - 1)) ? 0x01 : 0x00), // DEFLATE header bits, bfinal=0, btype=00
static_cast<uint8_t>((deflate_block_length >> 0) & 0xff), // Length LSB
static_cast<uint8_t>((deflate_block_length >> 8) & 0xff), // Length MSB
static_cast<uint8_t>((deflate_block_length >> 0) & 0xff) ^ 0xff, // ~Length LSB
Expand Down

0 comments on commit 36c38e4

Please sign in to comment.