1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 14:53:21 +02:00

Code cleanup

This commit is contained in:
Martin Tůma 2021-07-22 00:31:57 +02:00
parent a53fedf838
commit dc6a57338e

View File

@ -24,14 +24,8 @@ public:
if (!subFile)
return;
if (subFile->_path) {
_file.setFileName(*(subFile->_path));
_data.resize(1U<<BLOCK_BITS);
} else {
_file.setFileName(subFile->_img->fileName());
_data.resize(1U<<subFile->_img->blockBits());
}
_data.resize(1U<<subFile->blockBits());
_file.setFileName(subFile->fileName());
_file.open(QIODevice::ReadOnly);
}
@ -149,7 +143,8 @@ public:
bool readVUInt32(Handle &hdl, quint32 bytes, quint32 &val) const;
bool readVBitfield32(Handle &hdl, quint32 &bitfield) const;
QString fileName() const {return _path ? *_path : _img->fileName();}
const QString &fileName() const {return _path ? *_path : _img->fileName();}
unsigned blockBits() const {return _path ? BLOCK_BITS : _img->blockBits();}
protected:
quint32 _gmpOffset;