mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
Renamed colorX, colorY local variables in QrCode.getPenaltyScore() to just color, in all language versions.
This commit is contained in:
+6
-6
@@ -430,10 +430,10 @@ long QrCode::getPenaltyScore() const {
|
||||
|
||||
// Adjacent modules in row having same color
|
||||
for (int y = 0; y < size; y++) {
|
||||
bool colorX = false;
|
||||
bool color = false;
|
||||
for (int x = 0, runX = -1; x < size; x++) {
|
||||
if (x == 0 || module(x, y) != colorX) {
|
||||
colorX = module(x, y);
|
||||
if (x == 0 || module(x, y) != color) {
|
||||
color = module(x, y);
|
||||
runX = 1;
|
||||
} else {
|
||||
runX++;
|
||||
@@ -446,10 +446,10 @@ long QrCode::getPenaltyScore() const {
|
||||
}
|
||||
// Adjacent modules in column having same color
|
||||
for (int x = 0; x < size; x++) {
|
||||
bool colorY = false;
|
||||
bool color = false;
|
||||
for (int y = 0, runY = -1; y < size; y++) {
|
||||
if (y == 0 || module(x, y) != colorY) {
|
||||
colorY = module(x, y);
|
||||
if (y == 0 || module(x, y) != color) {
|
||||
color = module(x, y);
|
||||
runY = 1;
|
||||
} else {
|
||||
runY++;
|
||||
|
||||
Reference in New Issue
Block a user