From 2b300fab5401efa3d9618ecfd6abdcd9ec557d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Mon, 29 May 2023 23:19:16 +0200 Subject: [PATCH] Code cleanup --- src/map/ENC/rastertile.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index b81b29c5..8ec60f71 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -103,12 +103,10 @@ static Coordinates centroid(const QVector &polygon) static double angle(uint type, const QVariant ¶m) { - if (type>>16 == RDOCAL || type>>16 == I_RDOCAL) - return 90 + param.toDouble(); - else if (type>>16 == CURENT) - return 90 + param.toDouble(); - else - return NAN; + uint bt = type>>16; + + return (bt == RDOCAL || bt == I_RDOCAL || bt == CURENT) + ? 90 + param.toDouble() : NAN; } static bool showLabel(const QImage *img, const Range &range, int zoom, int type)