mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Give the compiler more posibilities for optimization
This commit is contained in:
parent
1773a1ae0d
commit
8b6d7acec5
@ -39,14 +39,6 @@ bool SubFile::seek(Handle &handle, quint32 pos) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SubFile::readByte(Handle &handle, quint8 &val) const
|
|
||||||
{
|
|
||||||
int blockSize = handle._file ? BLOCK_SIZE : _img->blockSize();
|
|
||||||
val = handle._data.at(handle._blockPos++);
|
|
||||||
handle._pos++;
|
|
||||||
return (handle._blockPos >= blockSize) ? seek(handle, handle._pos) : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool SubFile::readVUInt32(Handle &hdl, quint32 &val) const
|
bool SubFile::readVUInt32(Handle &hdl, quint32 &val) const
|
||||||
{
|
{
|
||||||
quint8 bytes, shift, b;
|
quint8 bytes, shift, b;
|
||||||
|
@ -147,7 +147,14 @@ protected:
|
|||||||
quint32 _gmpOffset;
|
quint32 _gmpOffset;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool readByte(Handle &handle, quint8 &val) const;
|
bool readByte(Handle &handle, quint8 &val) const
|
||||||
|
{
|
||||||
|
int blockSize = handle._file ? BLOCK_SIZE : _img->blockSize();
|
||||||
|
val = handle._data.at(handle._blockPos++);
|
||||||
|
handle._pos++;
|
||||||
|
return (handle._blockPos >= blockSize)
|
||||||
|
? seek(handle, handle._pos) : true;
|
||||||
|
}
|
||||||
|
|
||||||
IMG *_img;
|
IMG *_img;
|
||||||
QVector<quint16> *_blocks;
|
QVector<quint16> *_blocks;
|
||||||
|
Loading…
Reference in New Issue
Block a user