1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2020-02-02 09:03:35 +01:00
parent ca204626a1
commit 06a84dcea2

View File

@ -41,21 +41,17 @@ bool HuffmanStream::sign(int &val)
bool HuffmanStream::readDelta(int sign, qint32 &symbol)
{
uchar size;
if (_symbolDataSize < 32) {
quint8 size;
quint32 next;
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize),
bitsAvailable());
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize), bitsAvailable());
if (!read(nextSize, next))
return false;
_symbolData = (_symbolData << nextSize) | next;
_symbolDataSize += nextSize;
}
symbol = _table.symbol(_symbolData << (32U - _symbolDataSize), size);
symbol = _table.symbol(_symbolData << (32 - _symbolDataSize), size);
if (size <= _symbolDataSize)
_symbolDataSize -= size;