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
b9c1c6c6cf
commit
2f740d5b8e
@ -16,5 +16,5 @@ bool HuffmanBuffer::load(const RGNFile *rgn, SubFile::Handle &rgnHdl)
|
|||||||
};
|
};
|
||||||
|
|
||||||
resize(recordSize);
|
resize(recordSize);
|
||||||
return rgn->read(rgnHdl, (quint8*)data(), recordSize);
|
return rgn->read(rgnHdl, data(), recordSize);
|
||||||
}
|
}
|
||||||
|
@ -338,7 +338,7 @@ QImage LBLFile::readImage(Handle &hdl, quint32 id) const
|
|||||||
return QImage();
|
return QImage();
|
||||||
QByteArray ba;
|
QByteArray ba;
|
||||||
ba.resize(_rasters.at(id).size);
|
ba.resize(_rasters.at(id).size);
|
||||||
if (!read(hdl, (quint8*)ba.data(), _rasters.at(id).size))
|
if (!read(hdl, ba.data(), _rasters.at(id).size))
|
||||||
return QImage();
|
return QImage();
|
||||||
|
|
||||||
return QImage::fromData(ba);
|
return QImage::fromData(ba);
|
||||||
|
@ -116,7 +116,7 @@ bool SubFile::readVBitfield32(Handle &hdl, quint32 &bitfield) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SubFile::read(Handle &handle, quint8 *buff, quint32 size) const
|
bool SubFile::read(Handle &handle, char *buff, quint32 size) const
|
||||||
{
|
{
|
||||||
while (size) {
|
while (size) {
|
||||||
quint32 remaining = handle._data.size() - handle._blockPos;
|
quint32 remaining = handle._data.size() - handle._blockPos;
|
||||||
|
@ -60,7 +60,7 @@ public:
|
|||||||
bool seek(Handle &handle, quint32 pos) const;
|
bool seek(Handle &handle, quint32 pos) const;
|
||||||
quint32 pos(Handle &handle) const {return handle._pos;}
|
quint32 pos(Handle &handle) const {return handle._pos;}
|
||||||
|
|
||||||
bool read(Handle &handle, quint8 *buff, quint32 size) const;
|
bool read(Handle &handle, char *buff, quint32 size) const;
|
||||||
|
|
||||||
bool readByte(Handle &handle, quint8 *val) const
|
bool readByte(Handle &handle, quint8 *val) const
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user