mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-16 08:14:28 -04:00
Added initial values to some variables in C and C++ code to avoid potential compiler warnings.
This commit is contained in:
+4
-4
@@ -421,8 +421,8 @@ long QrCode::getPenaltyScore() const {
|
||||
|
||||
// Adjacent modules in row having same color
|
||||
for (int y = 0; y < size; y++) {
|
||||
bool colorX;
|
||||
for (int x = 0, runX; x < size; x++) {
|
||||
bool colorX = false;
|
||||
for (int x = 0, runX = -1; x < size; x++) {
|
||||
if (x == 0 || module(x, y) != colorX) {
|
||||
colorX = module(x, y);
|
||||
runX = 1;
|
||||
@@ -437,8 +437,8 @@ long QrCode::getPenaltyScore() const {
|
||||
}
|
||||
// Adjacent modules in column having same color
|
||||
for (int x = 0; x < size; x++) {
|
||||
bool colorY;
|
||||
for (int y = 0, runY; y < size; y++) {
|
||||
bool colorY = false;
|
||||
for (int y = 0, runY = -1; y < size; y++) {
|
||||
if (y == 0 || module(x, y) != colorY) {
|
||||
colorY = module(x, y);
|
||||
runY = 1;
|
||||
|
||||
Reference in New Issue
Block a user