mirror of
https://github.com/openharmony/third_party_qrcodegen.git
synced 2026-07-21 08:06:16 -04:00
In C++ version, added some more explicit casts for integer signedness and width.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
* Software.
|
||||
*/
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
@@ -83,7 +84,7 @@ int main() {
|
||||
|
||||
try { // Try to make QR Code symbol
|
||||
const QrCode qr = QrCode::encodeSegments(segs,
|
||||
ECC_LEVELS.at(errCorLvl), minVersion, maxVersion, mask, boostEcl == 1);
|
||||
ECC_LEVELS.at(static_cast<std::size_t>(errCorLvl)), minVersion, maxVersion, mask, boostEcl == 1);
|
||||
// Print grid of modules
|
||||
std::cout << qr.getVersion() << std::endl;
|
||||
for (int y = 0; y < qr.getSize(); y++) {
|
||||
|
||||
Reference in New Issue
Block a user