From 462a2f9068cf771784ef5db12ef859f4de7007f3 Mon Sep 17 00:00:00 2001 From: evoskuil Date: Sun, 14 Mar 2021 15:07:51 -0700 Subject: [PATCH] Remove lvalue use of qrcode->data. --- src/utility/qr_code.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utility/qr_code.cpp b/src/utility/qr_code.cpp index f670aefba08..0295ecd5c1c 100644 --- a/src/utility/qr_code.cpp +++ b/src/utility/qr_code.cpp @@ -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(scaled_width); - // Cast property to pointer to const to allow proper binding to data_chunk. - const auto coded = reinterpret_cast(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);