[prev in list] [next in list] [prev in thread] [next in thread] 

List:       geos-commits
Subject:    [geos-commits] r3499 - trunk/capi
From:       svn_geos () osgeo ! org
Date:       2011-10-05 23:24:56
Message-ID: 20111005232456.B8EA639032E () trac ! osgeo ! org
[Download RAW message or body]

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;     
 }
 

_______________________________________________
geos-commits mailing list
geos-commits@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/geos-commits

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic