From cfdc36d20799149cc573ffe9cdcb583f96dea800 Mon Sep 17 00:00:00 2001 From: Syping Date: Tue, 10 Oct 2017 07:54:20 +0200 Subject: [PATCH] replace round with qRound --- MapPreviewDialog.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/MapPreviewDialog.cpp b/MapPreviewDialog.cpp index 1efd416..8477bf0 100644 --- a/MapPreviewDialog.cpp +++ b/MapPreviewDialog.cpp @@ -22,9 +22,6 @@ #include "AppEnv.h" #include #include -#ifdef __MINGW32__ -#include -#endif MapPreviewDialog::MapPreviewDialog(QWidget *parent) : QDialog(parent), @@ -55,14 +52,14 @@ void MapPreviewDialog::drawPointOnMap(double xpos_d, double ypos_d) QSize mapPixelSize = size(); int pointMakerHalfSize = pointMakerSize / 2; - long xpos_ms = std::round(xpos_d); - long ypos_ms = std::round(ypos_d); + long xpos_ms = qRound(xpos_d); + long ypos_ms = qRound(ypos_d); double xpos_ma = xpos_ms + 4000; double ypos_ma = ypos_ms + 4000; double xrat = (double)mapPixelSize.width() / 10000; double yrat = (double)mapPixelSize.height() / 12000; - long xpos_mp = std::round(xpos_ma * xrat); - long ypos_mp = std::round(ypos_ma * yrat); + long xpos_mp = qRound(xpos_ma * xrat); + long ypos_mp = qRound(ypos_ma * yrat); long xpos_pr = xpos_mp - pointMakerHalfSize; long ypos_pr = ypos_mp + pointMakerHalfSize;