Skip to content

Commit

Permalink
Remove lvalue use of qrcode->data.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Mar 14, 2021
1 parent d5e37df commit 462a2f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utility/qr_code.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ bool qr_code::encode(std::ostream& out, const std::string& value,
// Limit of bc::tiff conversion maximum size.
const auto width = static_cast<uint16_t>(scaled_width);

// Cast property to pointer to const to allow proper binding to data_chunk.
const auto coded = reinterpret_cast<const uint8_t*>(qrcode->data);
// Map coded data into a data_chunk.
const data_chunk coded = qrcode->data;

// Convert to scaled image pixel bit stream.
const auto pixels = to_image_data(coded, scale, margin);
Expand Down

0 comments on commit 462a2f9

Please sign in to comment.