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

pull/118/head
Project Nayuki 3 years ago
parent a999dca15f
commit 68b2b7782b

@ -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

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

Loading…
Cancel
Save