Tweaked C++ code for style and robustness.
This commit is contained in:
parent
015c243fb2
commit
18f9b7c6ce
|
@ -280,7 +280,7 @@ class QrCode final {
|
||||||
* Creates a Reed-Solomon ECC generator for the given degree. This could be implemented
|
* Creates a Reed-Solomon ECC generator for the given degree. This could be implemented
|
||||||
* as a lookup table over all possible parameter values, instead of as an algorithm.
|
* as a lookup table over all possible parameter values, instead of as an algorithm.
|
||||||
*/
|
*/
|
||||||
public: ReedSolomonGenerator(int degree);
|
public: explicit ReedSolomonGenerator(int degree);
|
||||||
|
|
||||||
|
|
||||||
/*-- Method --*/
|
/*-- Method --*/
|
||||||
|
|
|
@ -60,7 +60,7 @@ int main() {
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
int b;
|
int b;
|
||||||
std::cin >> b;
|
std::cin >> b;
|
||||||
data.push_back((uint8_t)b);
|
data.push_back(static_cast<uint8_t>(b));
|
||||||
isAscii &= 0 < b && b < 128;
|
isAscii &= 0 < b && b < 128;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ class QrSegment final {
|
||||||
private: std::vector<bool> data;
|
private: std::vector<bool> data;
|
||||||
|
|
||||||
|
|
||||||
/*---- Constructor ----*/
|
/*---- Constructors ----*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Creates a new QR Code data segment with the given parameters and data.
|
* Creates a new QR Code data segment with the given parameters and data.
|
||||||
|
|
Loading…
Reference in New Issue