mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-18 17:55:48 -04:00
Renamed variable in QrCode.drawVersion() in all language versions.
This commit is contained in:
+3
-3
@@ -252,13 +252,13 @@ void QrCode::drawVersion() {
|
||||
int rem = version; // version is uint6, in the range [7, 40]
|
||||
for (int i = 0; i < 12; i++)
|
||||
rem = (rem << 1) ^ ((rem >> 11) * 0x1F25);
|
||||
long data = (long)version << 12 | rem; // uint18
|
||||
if (data >> 18 != 0)
|
||||
long bits = (long)version << 12 | rem; // uint18
|
||||
if (bits >> 18 != 0)
|
||||
throw std::logic_error("Assertion error");
|
||||
|
||||
// Draw two copies
|
||||
for (int i = 0; i < 18; i++) {
|
||||
bool bit = getBit(data, i);
|
||||
bool bit = getBit(bits, i);
|
||||
int a = size - 11 + i % 3, b = i / 3;
|
||||
setFunctionModule(a, b, bit);
|
||||
setFunctionModule(b, a, bit);
|
||||
|
||||
Reference in New Issue
Block a user