Skip to content

Commit e19268f

Browse files
committed
fix: compiler warning wconversion
[]
1 parent 2c9044d commit e19268f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

cpp/qrcodegen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ QrCode QrCode::encodeSegments(const vector<QrSegment> &segs, Ecc ecl,
310310
// Pack bits into bytes in big endian
311311
vector<uint8_t> dataCodewords(bb.size() / 8);
312312
for (size_t i = 0; i < bb.size(); i++)
313-
dataCodewords.at(i >> 3) |= (bb.at(i) ? 1 : 0) << (7 - (i & 7));
313+
dataCodewords.at(i >> 3) |= static_cast<uint_t>((bb.at(i) ? 1 : 0) << (7 - (i & 7)));
314314

315315
// Create the QR Code object
316316
return QrCode(version, ecl, dataCodewords, mask);

0 commit comments

Comments
 (0)