summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <tsdgeos@terra.es>2012-01-22 15:02:19 (GMT)
committerAlbert Astals Cid <tsdgeos@terra.es>2012-01-22 15:02:57 (GMT)
commite9b303a1a6581b81f81c0af2613eb76464ff4967 (patch)
tree8c2339a94459c53edb5b6a933b776c7b96651faf
parent8a83b8000777fafe4496f6c0b95c42f226184d8f (diff)
Get rid of ambiguity by casting to double
BUGS: 291912 (cherry picked from commit 3661d037a4f2ddaf875fbb660a632a3b7e56a148)
-rw-r--r--src/placemapwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/placemapwidget.cpp b/src/placemapwidget.cpp
index 601b1f7..94a4460 100644
--- a/src/placemapwidget.cpp
+++ b/src/placemapwidget.cpp
@@ -86,7 +86,7 @@ QString writeUpBorderStats(const QVector<size_t> &stats, const QVector<size_t> &
{
int nbCells = stats.size(); // = n * (n*1) / 2 => 2p == n2 + n => n2 + n -2p == 0
// delta = 1 + 8p -> n = (-1 +/- sqrt(1 + 8p))/2
- int nbRows = (sqrt(1 + 8 * nbCells) -1) /2;
+ int nbRows = (sqrt((double)1 + 8 * nbCells) -1) /2;
QString ret;
ret += "\n";
ret.reserve(17 * nbCells + nbRows * 20);