[geos-commits] [SCM] geos branch svn-trunk updated. 667d18feff7acc6fa35fddc26d5884fc67b710dc

git at osgeo.org git at osgeo.org
Mon Apr 10 14:28:49 PDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "geos".

The branch, svn-trunk has been updated
       via  667d18feff7acc6fa35fddc26d5884fc67b710dc (commit)
      from  133c801ff16a5755d915ef9a80cdb66ecf814730 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 667d18feff7acc6fa35fddc26d5884fc67b710dc
Author: Mateusz Loskot <mateusz at loskot.net>
Date:   Mon Apr 10 23:29:56 2017 +0200

    Add explicit cast of sqrt arguments to double
    
    Fixes parts of #801

diff --git a/tests/unit/capi/GEOSSTRtreeTest.cpp b/tests/unit/capi/GEOSSTRtreeTest.cpp
index 5cccad7..dd3bb4e 100644
--- a/tests/unit/capi/GEOSSTRtreeTest.cpp
+++ b/tests/unit/capi/GEOSSTRtreeTest.cpp
@@ -30,7 +30,7 @@ static int INTPOINT_dist(const void* a, const void* b, double* distance, void* u
 	int dx = p2->x - p1->x;
 	int dy = p2->y - p1->y;
 
-	*distance = sqrt(dx*dx + dy*dy);
+	*distance = sqrt(static_cast<double>(dx*dx) + dy*dy);
 	return 1;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 tests/unit/capi/GEOSSTRtreeTest.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
geos


More information about the geos-commits mailing list