Revision: 7801
          http://playerstage.svn.sourceforge.net/playerstage/?rev=7801&view=rev
Author:   thjc
Date:     2009-06-06 09:39:40 +0000 (Sat, 06 Jun 2009)

Log Message:
-----------
applied patch 2802020: Player SVN trunk: vec2map patch

Modified Paths:
--------------
    code/player/trunk/server/drivers/vectormap/CMakeLists.txt
    code/player/trunk/server/drivers/vectormap/vec2map.cc

Modified: code/player/trunk/server/drivers/vectormap/CMakeLists.txt
===================================================================
--- code/player/trunk/server/drivers/vectormap/CMakeLists.txt   2009-06-06 
09:31:46 UTC (rev 7800)
+++ code/player/trunk/server/drivers/vectormap/CMakeLists.txt   2009-06-06 
09:39:40 UTC (rev 7801)
@@ -10,12 +10,6 @@
     "${postgis_linkLibs}" LINKFLAGS "${postgis_linkFlags}"
     CFLAGS "${postgis_cFlags}" SOURCES postgis.cc dbconn.cc)
 
-IF (HAVE_STL)
-    PLAYERDRIVER_OPTION (vec2map build_vec2map ON)
-ELSE (HAVE_STL)
-    PLAYERDRIVER_OPTION (vec2map build_vec2map OFF "STL not found")
-ENDIF (HAVE_STL)
-
+PLAYERDRIVER_OPTION (vec2map build_vec2map ON)
 SET(vec2map_linkFlags)
-
 PLAYERDRIVER_ADD_DRIVER (vec2map build_vec2map LINKFLAGS 
"${vec2map_linkFlags}" SOURCES vec2map.cc)

Modified: code/player/trunk/server/drivers/vectormap/vec2map.cc
===================================================================
--- code/player/trunk/server/drivers/vectormap/vec2map.cc       2009-06-06 
09:31:46 UTC (rev 7800)
+++ code/player/trunk/server/drivers/vectormap/vec2map.cc       2009-06-06 
09:39:40 UTC (rev 7801)
@@ -301,10 +301,10 @@
     if (d < b) wspY = -wspY;
 
     x = static_cast<double>(a); y = static_cast<double>(b);
-    if (x < 0) x = 0;
-    if (y < 0) y = 0;
-    if (x >= width) x = (width - 1);
-    if (y >= height) y = (height - 1);
+    if (static_cast<int>(x) < 0) x = 0.0;
+    if (static_cast<int>(y) < 0) y = 0.0;
+    if (static_cast<int>(x) >= width) x = static_cast<double>(width - 1);
+    if (static_cast<int>(y) >= height) y = static_cast<double>(height - 1);
     cells[(static_cast<int>(y) * width) + (static_cast<int>(x))] = 1;
     if ((fabs(wspX) < EPS) && (fabs(wspY) < EPS)) return;
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit

Reply via email to