Reformatted small pieces of C code.

pull/39/merge
Project Nayuki 7 years ago
parent e2789cd5c4
commit 536a881416

@ -239,8 +239,11 @@ testable void addEccAndInterleave(uint8_t data[], int version, enum qrcodegen_Ec
// for the given version number and error correction level. The result is in the range [9, 2956].
testable int getNumDataCodewords(int version, enum qrcodegen_Ecc ecl) {
int v = version, e = (int)ecl;
assert(0 <= e && e < 4 && qrcodegen_VERSION_MIN <= v && v <= qrcodegen_VERSION_MAX);
return getNumRawDataModules(v) / 8 - ECC_CODEWORDS_PER_BLOCK[e][v] * NUM_ERROR_CORRECTION_BLOCKS[e][v];
assert(qrcodegen_VERSION_MIN <= v && v <= qrcodegen_VERSION_MAX
&& 0 <= e && e < 4);
return getNumRawDataModules(v) / 8
- ECC_CODEWORDS_PER_BLOCK[e][v]
* NUM_ERROR_CORRECTION_BLOCKS[e][v];
}

Loading…
Cancel
Save