From 4bf81e020f91862361e6f6654d4a5c8635c17f45 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20T=C5=AFma?= Date: Thu, 3 Aug 2023 00:39:56 +0200 Subject: [PATCH] Yet another code cleanup --- src/map/IMG/rastertile.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index d9a8955d..481b98a0 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -18,6 +18,9 @@ using namespace IMG; #define AREA(rect) \ (rect.size().width() * rect.size().height()) +#define ROAD 0 +#define WATER 1 + static const QColor textColor(Qt::black); static const QColor haloColor(Qt::white); static const QColor shieldColor(Qt::white); @@ -327,7 +330,7 @@ void RasterTile::processStreetNames(const QList &lines, const QColor *hColor = Style::isContourLine(poly.type) ? 0 : &haloColor; const QImage *img = poly.oneway ? Style::isWaterLine(poly.type) - ? &arrows[1] : &arrows[0] : 0; + ? &arrows[WATER] : &arrows[ROAD] : 0; const QString *label = poly.label.text().isEmpty() ? 0 : &poly.label.text(); @@ -479,9 +482,9 @@ void RasterTile::render() QList textItems; QImage arrows[2]; - arrows[0] = (_ratio >= 2) + arrows[ROAD] = (_ratio >= 2) ? QImage(":/map/arrow@2x.png") : QImage(":/map/arrow.png"); - arrows[1] = (_ratio >= 2) + arrows[WATER] = (_ratio >= 2) ? QImage(":/map/water-arrow@2x.png") : QImage(":/map/water-arrow.png"); fetchData(polygons, lines, points); -- 2.11.4.GIT