mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-17 04:14:24 +02:00
Code cleanup
This commit is contained in:
@ -323,7 +323,7 @@ bool ISO8211::readRecord(Record &record)
|
||||
const FieldDefinition &def = fields.at(i);
|
||||
Data data;
|
||||
|
||||
FieldsMap::const_iterator it = _map.find(def.tag);
|
||||
FieldsMap::const_iterator it(_map.find(def.tag));
|
||||
if (it == _map.constEnd()) {
|
||||
_errorString = QString("%1: unknown record").arg(QString(def.tag));
|
||||
return false;
|
||||
|
@ -86,7 +86,7 @@ static QMap<uint,uint> orderMap = orderMapInit();
|
||||
static uint order(uint type)
|
||||
{
|
||||
uint st = ((type>>16) == BUAARE) ? type : (type & 0xFFFF0000);
|
||||
QMap<uint, uint>::const_iterator it = orderMap.find(st);
|
||||
QMap<uint, uint>::const_iterator it(orderMap.find(st));
|
||||
return (it == orderMap.constEnd()) ? (type>>16) + 512 : it.value();
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,8 @@ using namespace ENC;
|
||||
typedef QSet<Coordinates> PointSet;
|
||||
|
||||
static const float C1 = 0.866025f; /* sqrt(3)/2 */
|
||||
static const QColor haloColor(Qt::white);
|
||||
static const QColor tsslptPen = QColor("#eb49eb");
|
||||
static const QColor tsslptBrush = QColor("#80eb49eb");
|
||||
|
||||
static const Style *style()
|
||||
{
|
||||
@ -174,8 +175,8 @@ void RasterTile::drawArrows(QPainter *painter,
|
||||
QPolygonF polygon(tsslptArrow(centroid(poly.path().first()),
|
||||
deg2rad(180 - poly.param().toDouble())));
|
||||
|
||||
painter->setPen(QPen(QColor("#eb49eb"), 1));
|
||||
painter->setBrush(QBrush("#80eb49eb"));
|
||||
painter->setPen(QPen(tsslptPen, 1));
|
||||
painter->setBrush(QBrush(tsslptBrush));
|
||||
painter->drawPolygon(polygon);
|
||||
}
|
||||
}
|
||||
|
@ -344,7 +344,7 @@ const Style::Line &Style::line(uint type) const
|
||||
{
|
||||
static Line null;
|
||||
|
||||
QMap<uint, Line>::const_iterator it = _lines.find(type);
|
||||
QMap<uint, Line>::const_iterator it(_lines.find(type));
|
||||
return (it == _lines.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
@ -352,7 +352,7 @@ const Style::Polygon &Style::polygon(uint type) const
|
||||
{
|
||||
static Polygon null;
|
||||
|
||||
QMap<uint, Polygon>::const_iterator it = _polygons.find(type);
|
||||
QMap<uint, Polygon>::const_iterator it(_polygons.find(type));
|
||||
return (it == _polygons.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
@ -360,7 +360,7 @@ const Style::Point &Style::point(uint type) const
|
||||
{
|
||||
static Point null;
|
||||
|
||||
QMap<uint, Point>::const_iterator it = _points.find(type);
|
||||
QMap<uint, Point>::const_iterator it(_points.find(type));
|
||||
return (it == _points.constEnd()) ? null : *it;
|
||||
}
|
||||
|
||||
|
@ -111,6 +111,7 @@ private:
|
||||
QMap<uint, Point> _points;
|
||||
QVector<uint> _drawOrder;
|
||||
|
||||
/* Fonts and images must be initialized after QGuiApplication! */
|
||||
QFont _small, _normal, _large;
|
||||
QImage _light, _signal;
|
||||
};
|
||||
|
Reference in New Issue
Block a user