[geos-commits] r3253 - in trunk: include/geos/io src/io

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Mar 1 12:50:36 EST 2011


Author: mloskot
Date: 2011-03-01 09:50:36 -0800 (Tue, 01 Mar 2011)
New Revision: 3253

Modified:
   trunk/include/geos/io/ByteOrderValues.h
   trunk/src/io/ByteOrderValues.cpp
Log:
Redefined ENDIAN_BIG and ENDIAN_LITTLE as enumerators instead of static non-const members - Visual C++ linker has mysterious problems with exporting them from DLL.

Modified: trunk/include/geos/io/ByteOrderValues.h
===================================================================
--- trunk/include/geos/io/ByteOrderValues.h	2011-02-28 14:36:07 UTC (rev 3252)
+++ trunk/include/geos/io/ByteOrderValues.h	2011-03-01 17:50:36 UTC (rev 3253)
@@ -22,7 +22,6 @@
 #define GEOS_IO_BYTEORDERVALUES_H
 
 #include <geos/export.h>
-
 #include <geos/platform.h>
 
 namespace geos {
@@ -40,8 +39,11 @@
 
 public:
 
-	static int ENDIAN_BIG;
-	static int ENDIAN_LITTLE;
+    enum EndianType
+    {
+        ENDIAN_BIG = 0,
+        ENDIAN_LITTLE = 1
+    };
 
 	static int getInt(const unsigned char *buf, int byteOrder);
 	static void putInt(int intValue, unsigned char *buf, int byteOrder);

Modified: trunk/src/io/ByteOrderValues.cpp
===================================================================
--- trunk/src/io/ByteOrderValues.cpp	2011-02-28 14:36:07 UTC (rev 3252)
+++ trunk/src/io/ByteOrderValues.cpp	2011-03-01 17:50:36 UTC (rev 3253)
@@ -27,9 +27,6 @@
 namespace geos {
 namespace io { // geos.io
 
-int ByteOrderValues::ENDIAN_BIG = 0;
-int ByteOrderValues::ENDIAN_LITTLE = 1;
-
 int
 ByteOrderValues::getInt(const unsigned char *buf, int byteOrder)
 {



More information about the geos-commits mailing list