mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Code cleanup
This commit is contained in:
parent
ca204626a1
commit
06a84dcea2
@ -41,21 +41,17 @@ bool HuffmanStream::sign(int &val)
|
|||||||
|
|
||||||
bool HuffmanStream::readDelta(int sign, qint32 &symbol)
|
bool HuffmanStream::readDelta(int sign, qint32 &symbol)
|
||||||
{
|
{
|
||||||
uchar size;
|
quint8 size;
|
||||||
|
|
||||||
if (_symbolDataSize < 32) {
|
|
||||||
quint32 next;
|
quint32 next;
|
||||||
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize),
|
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize), bitsAvailable());
|
||||||
bitsAvailable());
|
|
||||||
|
|
||||||
if (!read(nextSize, next))
|
if (!read(nextSize, next))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
_symbolData = (_symbolData << nextSize) | next;
|
_symbolData = (_symbolData << nextSize) | next;
|
||||||
_symbolDataSize += nextSize;
|
_symbolDataSize += nextSize;
|
||||||
}
|
|
||||||
|
|
||||||
symbol = _table.symbol(_symbolData << (32U - _symbolDataSize), size);
|
symbol = _table.symbol(_symbolData << (32 - _symbolDataSize), size);
|
||||||
|
|
||||||
if (size <= _symbolDataSize)
|
if (size <= _symbolDataSize)
|
||||||
_symbolDataSize -= size;
|
_symbolDataSize -= size;
|
||||||
|
Loading…
Reference in New Issue
Block a user