Simplified Java and C++ code to remove unnecessary this, also improving consistency with other field assignments, enabled by a local variable renaming in commit 67c62461d380.

This commit is contained in:
Project Nayuki 2021-07-24 21:54:42 +00:00
parent a999dca15f
commit 68b2b7782b
2 changed files with 2 additions and 2 deletions

View File

@ -351,7 +351,7 @@ QrCode::QrCode(int ver, Ecc ecl, const vector<uint8_t> &dataCodewords, int msk)
}
if (msk < 0 || msk > 7)
throw std::logic_error("Assertion error");
this->mask = msk;
mask = msk;
applyMask(msk); // Apply the final choice of mask
drawFormatBits(msk); // Overwrite old format bits

View File

@ -263,7 +263,7 @@ public final class QrCode {
drawFunctionPatterns();
byte[] allCodewords = addEccAndInterleave(dataCodewords);
drawCodewords(allCodewords);
this.mask = handleConstructorMasking(msk);
mask = handleConstructorMasking(msk);
isFunction = null;
}