mirror of
https://github.com/status-im/QR-Code-generator.git
synced 2026-08-31 01:31:10 +00:00
- Deleted constructors/functions/code for remasking existing QrCode object (due to doubtful real-world usefulness): C++, Java, JavaScript, Python, Rust.
- Tweaked code and comments due to feature removal: JavaScript, Python. - Updated demo programs to reflect new API usage and add new example: C, C++, Java, Python, Rust.
This commit is contained in:
@@ -139,25 +139,6 @@ QrCode::QrCode(int ver, Ecc ecl, const vector<uint8_t> &dataCodewords, int mask)
|
||||
}
|
||||
|
||||
|
||||
QrCode::QrCode(const QrCode &qr, int mask) :
|
||||
// Copy scalar fields
|
||||
version(qr.version),
|
||||
size(qr.size),
|
||||
errorCorrectionLevel(qr.errorCorrectionLevel),
|
||||
// Handle grid fields
|
||||
modules(qr.modules),
|
||||
isFunction(qr.isFunction) {
|
||||
|
||||
// Check arguments
|
||||
if (mask < -1 || mask > 7)
|
||||
throw "Mask value out of range";
|
||||
|
||||
// Handle masking
|
||||
applyMask(qr.mask); // Undo old mask
|
||||
this->mask = handleConstructorMasking(mask);
|
||||
}
|
||||
|
||||
|
||||
int QrCode::getVersion() const {
|
||||
return version;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user