Updated some C++ implementation code to be stricter by prepending std:: prefix for C standard library types.

This commit is contained in:
Project Nayuki 2017-05-05 20:56:32 +00:00
parent 33af4e376e
commit 58046f902f
2 changed files with 3 additions and 3 deletions

View File

@ -37,12 +37,12 @@ int BitBuffer::getBitLength() const {
}
std::vector<uint8_t> BitBuffer::getBytes() const {
std::vector<std::uint8_t> BitBuffer::getBytes() const {
return data;
}
void BitBuffer::appendBits(uint32_t val, int len) {
void BitBuffer::appendBits(std::uint32_t val, int len) {
if (len < 0 || len > 32 || (len < 32 && (val >> len) != 0))
throw "Value out of range";
if (len > INT_MAX - bitLength)

View File

@ -137,7 +137,7 @@ int QrSegment::getTotalBits(const std::vector<QrSegment> &segs, int version) {
if (version < 1 || version > 40)
throw "Version number out of range";
int result = 0;
for (size_t i = 0; i < segs.size(); i++) {
for (std::size_t i = 0; i < segs.size(); i++) {
const QrSegment &seg(segs.at(i));
int ccbits = seg.mode.numCharCountBits(version);
// Fail if segment length value doesn't fit in the length field's bit-width