1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Code cleanup

This commit is contained in:
Martin Tůma 2021-03-19 09:12:42 +01:00
parent 0a87c06b0d
commit a4648020d9
2 changed files with 6 additions and 2 deletions

View File

@ -58,11 +58,13 @@ bool RGNFile::readClassFields(Handle &hdl, SegmentType segmentType,
break;
}
if (segmentType == Polygon && poly->type == 0x10613
&& lbl && lbl->imageIdSize() && rs >= lbl->imageIdSize() + 16U) {
if (segmentType == Polygon && Style::isRaster(poly->type) && lbl
&& lbl->imageIdSize()) {
quint32 id;
quint32 top, right, bottom, left;
if (rs < lbl->imageIdSize() + 16U)
return false;
if (!(readVUInt32(hdl, lbl->imageIdSize(), id)
&& readUInt32(hdl, top) && readUInt32(hdl, right)
&& readUInt32(hdl, bottom) && readUInt32(hdl, left)))

View File

@ -131,6 +131,8 @@ public:
{return (type >= 0x1400 && type <= 0x153f);}
static bool isState(quint32 type)
{return (type == TYPE(0x1e));}
static bool isRaster(quint32 type)
{return (type == 0x10613);}
static POIClass poiClass(quint32 type);