mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +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;
|
||||||
|
quint32 next;
|
||||||
|
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize), bitsAvailable());
|
||||||
|
|
||||||
if (_symbolDataSize < 32) {
|
if (!read(nextSize, next))
|
||||||
quint32 next;
|
return false;
|
||||||
quint8 nextSize = qMin((quint32)(32 - _symbolDataSize),
|
|
||||||
bitsAvailable());
|
|
||||||
|
|
||||||
if (!read(nextSize, next))
|
_symbolData = (_symbolData << nextSize) | next;
|
||||||
return false;
|
_symbolDataSize += nextSize;
|
||||||
|
|
||||||
_symbolData = (_symbolData << nextSize) | next;
|
symbol = _table.symbol(_symbolData << (32 - _symbolDataSize), size);
|
||||||
_symbolDataSize += nextSize;
|
|
||||||
}
|
|
||||||
|
|
||||||
symbol = _table.symbol(_symbolData << (32U - _symbolDataSize), size);
|
|
||||||
|
|
||||||
if (size <= _symbolDataSize)
|
if (size <= _symbolDataSize)
|
||||||
_symbolDataSize -= size;
|
_symbolDataSize -= size;
|
||||||
|
Loading…
Reference in New Issue
Block a user