Deleted unnecessary version range check in two private functions, in all language versions except Rust.

This commit is contained in:
Project Nayuki
2018-08-28 19:45:09 +00:00
parent 7fe69730c4
commit 16b59e207d
8 changed files with 1 additions and 24 deletions
-2
View File
@@ -526,8 +526,6 @@ int QrCode::getNumRawDataModules(int ver) {
int QrCode::getNumDataCodewords(int ver, Ecc ecl) {
if (ver < MIN_VERSION || ver > MAX_VERSION)
throw std::domain_error("Version number out of range");
return getNumRawDataModules(ver) / 8
- ECC_CODEWORDS_PER_BLOCK[static_cast<int>(ecl)][ver]
* NUM_ERROR_CORRECTION_BLOCKS[static_cast<int>(ecl)][ver];