[geos-commits] r2179 - trunk/capi

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Aug 29 14:17:22 EDT 2008


Author: mloskot
Date: 2008-08-29 14:17:21 -0400 (Fri, 29 Aug 2008)
New Revision: 2179

Modified:
   trunk/capi/geos_c.cpp
Log:
Removed redundant return expressions from geos_c.cpp. Testing changes notifications for buildbot.

Modified: trunk/capi/geos_c.cpp
===================================================================
--- trunk/capi/geos_c.cpp	2008-08-29 15:00:26 UTC (rev 2178)
+++ trunk/capi/geos_c.cpp	2008-08-29 18:17:21 UTC (rev 2179)
@@ -323,31 +323,27 @@
 	try {
 
 		IntersectionMatrix *im = g1->relate(g2);
-
-		std::string s;
-		char *result;
 		if (im == NULL)
 				return NULL;
-
-		s= im->toString();
+		
+        std::string s(im->toString());
+		char *result = NULL;
 		result = (char*) std::malloc( s.length() + 1);
 		std::strcpy(result, s.c_str() );
 		delete im;
 
 		return result;
 	}
-
 	catch (const std::exception &e)
 	{
 		ERROR_MESSAGE("%s", e.what());
-		return NULL;
 	}
-
 	catch (...)
 	{
 		ERROR_MESSAGE("Unknown exception thrown");
-		return NULL;
 	}
+    
+    return NULL;
 }
 
 



More information about the geos-commits mailing list