mirror of
https://gitee.com/openharmony/third_party_qrcodegen
synced 2025-02-19 08:40:29 +00:00
Simplified an expression because C++11 natively supports for-each over a braced list, without needing to construct a typed object.
This commit is contained in:
parent
8518684c0f
commit
a999dca15f
@ -279,7 +279,7 @@ QrCode QrCode::encodeSegments(const vector<QrSegment> &segs, Ecc ecl,
|
||||
throw std::logic_error("Assertion error");
|
||||
|
||||
// Increase the error correction level while the data still fits in the current version number
|
||||
for (Ecc newEcl : vector<Ecc>{Ecc::MEDIUM, Ecc::QUARTILE, Ecc::HIGH}) { // From low to high
|
||||
for (Ecc newEcl : {Ecc::MEDIUM, Ecc::QUARTILE, Ecc::HIGH}) { // From low to high
|
||||
if (boostEcl && dataUsedBits <= getNumDataCodewords(version, newEcl) * 8)
|
||||
ecl = newEcl;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user