[geos-commits] r3499 - trunk/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Oct 5 19:24:56 EDT 2011


Author: mloskot
Date: 2011-10-05 16:24:56 -0700 (Wed, 05 Oct 2011)
New Revision: 3499

Modified:
   trunk/capi/geos_ts_c.cpp
Log:
Removed redundant casts between integer types

Modified: trunk/capi/geos_ts_c.cpp
===================================================================
--- trunk/capi/geos_ts_c.cpp	2011-10-05 00:09:10 UTC (rev 3498)
+++ trunk/capi/geos_ts_c.cpp	2011-10-05 23:24:56 UTC (rev 3499)
@@ -1231,7 +1231,7 @@
     using geos::io::WKBWriter;
     try
     {
-        int byteOrder = static_cast<int>(handle->WKBByteOrder);
+        int byteOrder = handle->WKBByteOrder;
         WKBWriter w(handle->WKBOutputDims, byteOrder);
         std::ostringstream os(std::ios_base::binary);
         w.write(*g, os);
@@ -1317,7 +1317,7 @@
     using geos::io::WKBWriter;
     try
     {
-        int byteOrder = static_cast<int>(handle->WKBByteOrder);
+        int byteOrder = handle->WKBByteOrder;
         WKBWriter w(handle->WKBOutputDims, byteOrder);
         std::ostringstream os(std::ios_base::binary);
         w.writeHEX(*g, os);
@@ -2577,7 +2577,7 @@
 			handle->ERROR_MESSAGE("Argument is not a LineString");
 			return -1;
 		}
-		return ls->getNumPoints();
+		return static_cast<int>(ls->getNumPoints());
     }
     catch (const std::exception &e)
     {
@@ -3419,7 +3419,7 @@
 
     try
     {
-        cs->setOrdinate(static_cast<int>(idx), static_cast<int>(dim), val);
+        cs->setOrdinate(idx, dim, val);
         return 1;
     }
     catch (const std::exception &e)
@@ -3506,7 +3506,7 @@
 
     try
     {
-        double d = cs->getOrdinate(static_cast<int>(idx), static_cast<int>(dim));
+        double d = cs->getOrdinate(idx, dim);
         *val = d;
 
         return 1;
@@ -4907,7 +4907,7 @@
         try
         {
             int srid = writer->getIncludeSRID();
-            ret = static_cast<char>(srid);
+            ret = srid;
         }
         catch (...)
         {
@@ -5933,6 +5933,7 @@
 void
 GEOSBufferParams_destroy_r(GEOSContextHandle_t extHandle, BufferParameters* p)
 {
+  (void)extHandle;
   delete p;     
 }
 



More information about the geos-commits mailing list