Updated some C++ implementation code to be stricter by prepending std:: prefix for C standard library types.
This commit is contained in:
parent
33af4e376e
commit
58046f902f
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue