mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 02:36:45 +02:00
fixed another warning
This commit is contained in:
parent
64479b067e
commit
e76ffb2ecb
1 changed files with 2 additions and 2 deletions
|
@ -66,7 +66,7 @@ template<typename T> inline QByteArray ByteCountCoded<T>::encode() const {
|
||||||
T lastBitMask = (T)(1) << (totalBits - 1);
|
T lastBitMask = (T)(1) << (totalBits - 1);
|
||||||
|
|
||||||
// determine the number of bits that the value takes
|
// determine the number of bits that the value takes
|
||||||
for (size_t bitAt = 0; bitAt < totalBits; bitAt++) {
|
for (int bitAt = 0; bitAt < totalBits; bitAt++) {
|
||||||
T bitValue = (temp & lastBitMask) == lastBitMask;
|
T bitValue = (temp & lastBitMask) == lastBitMask;
|
||||||
if (!firstValueFound) {
|
if (!firstValueFound) {
|
||||||
if (bitValue == 0) {
|
if (bitValue == 0) {
|
||||||
|
@ -81,7 +81,7 @@ template<typename T> inline QByteArray ByteCountCoded<T>::encode() const {
|
||||||
// calculate the number of total bytes, including our header
|
// calculate the number of total bytes, including our header
|
||||||
// BITS_IN_BYTE-1 because we need to code the number of bytes in the header
|
// BITS_IN_BYTE-1 because we need to code the number of bytes in the header
|
||||||
// + 1 because we always take at least 1 byte, even if number of bits is less than a bytes worth
|
// + 1 because we always take at least 1 byte, even if number of bits is less than a bytes worth
|
||||||
size_t numberOfBytes = (valueBits / (BITS_IN_BYTE - 1)) + 1;
|
int numberOfBytes = (valueBits / (BITS_IN_BYTE - 1)) + 1;
|
||||||
|
|
||||||
output.fill(0, numberOfBytes);
|
output.fill(0, numberOfBytes);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue