From 0422b46843183f15928b96bc264423c4e4b769a4 Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Wed, 8 Jan 2014 14:38:38 -0800 Subject: [PATCH] Fix broken Windows build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TeamCity caught this, but I thought the error was from my warnings work. Turns out it was a real build failure. Windows doesn’t know which floating point floor to use. In reality the parentheses are in the wrong place and should be the floor of the divide by 2. But integer division is always floor, so it’s not needed at all. --- src/ui/QGCParamWidget.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/QGCParamWidget.cc b/src/ui/QGCParamWidget.cc index f241196..8caeede 100644 --- a/src/ui/QGCParamWidget.cc +++ b/src/ui/QGCParamWidget.cc @@ -331,7 +331,7 @@ void QGCParamWidget::insertParamAlphabetical(int indexLowerBound, int indexUpper } else { - int midpoint = indexLowerBound + floor(indexUpperBound - indexLowerBound)/2; + int midpoint = indexLowerBound + ((indexUpperBound - indexLowerBound) / 2); if (paramItem->text(0).compare(parentItem->child(midpoint)->text(0)) < 0) {