Skip to content

Commit

Permalink
Fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Jun 28, 2016
1 parent 45a4ae2 commit 3d6ea7b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/src/core/testqgsgeometryutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ void TestQgsGeometryUtils::testSqrDistToLine()
p1.x(), p1.y(),
p2.x(), p2.y(),
rx, ry, epsilon );
sqrDist = round( sqrDist * 100 ) / 100;
sqrDist = qRound( sqrDist * 100 ) / 100;
QCOMPARE( sqrDist, 11.83 );
}

Expand Down

3 comments on commit 3d6ea7b

@NathanW2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems I broke the build with this. What should we use on windows?

@rouault
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qRound() returns a int, so you just have to change / 100 by / 100.0 for example

@NathanW2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right. Thanks not sure how I didn't see that :)

Please sign in to comment.