Tweaked integer casts and types in C++ code for robustness and simplicity.

This commit is contained in:
Project Nayuki
2018-08-31 17:20:14 +00:00
parent 7217de3eee
commit 46443ecf22
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -60,7 +60,7 @@ const QrSegment::Mode QrSegment::Mode::ECI (0x7, 0, 0, 0);
QrSegment QrSegment::makeBytes(const vector<uint8_t> &data) {
if (data.size() > INT_MAX)
if (data.size() > static_cast<unsigned int>(INT_MAX))
throw std::length_error("Data too long");
BitBuffer bb;
for (uint8_t b : data)