[fdo-commits] r785 - branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf

svn_fdo at osgeo.org svn_fdo at osgeo.org
Mon Feb 19 18:29:34 EST 2007


Author: gavincramer
Date: 2007-02-19 18:29:33 -0500 (Mon, 19 Feb 2007)
New Revision: 785

Modified:
   branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/GeometryImpl.h
   branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Pool.h
   branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.cpp
   branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.h
Log:
Fix Linux build for FdoGeometry

Modified: branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/GeometryImpl.h
===================================================================
--- branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/GeometryImpl.h	2007-02-17 23:25:15 UTC (rev 784)
+++ branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/GeometryImpl.h	2007-02-19 23:29:33 UTC (rev 785)
@@ -64,8 +64,7 @@
     // The array can be either in a FdoByteArray or a native C++ array.
 	virtual void SetFgf(FdoByteArray * fgf, const FdoByte* fgfData, FdoInt32 count)
     {
-        if (m_byteArray != NULL)
-            FgfUtil::GetPoolsNoRef(m_pools)->TakeReleasedByteArray(m_byteArray);
+        SurrenderByteArray();
 
         if (NULL != fgf)
         {
@@ -151,7 +150,7 @@
         {
             FdoFgfGeometryPools * pools = FgfUtil::GetPoolsNoRef(m_pools);
             if (NULL != pools)
-                pools->TakeReleasedByteArray(m_byteArray);
+                FgfUtil::TakeReleasedByteArray(pools, m_byteArray);
             m_byteArray = NULL;
         }
     }

Modified: branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Pool.h
===================================================================
--- branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Pool.h	2007-02-17 23:25:15 UTC (rev 784)
+++ branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Pool.h	2007-02-19 23:29:33 UTC (rev 785)
@@ -178,7 +178,7 @@
     virtual ~FdoPool(void)
     {
         m_AllowAdds = false;
-        Clear();
+        FdoCollection <OBJ, EXC>::Clear();
     }
 private:
     FdoInt32    m_MaxSize;  // Maximum number of objects in the pool.

Modified: branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.cpp
===================================================================
--- branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.cpp	2007-02-17 23:25:15 UTC (rev 784)
+++ branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.cpp	2007-02-19 23:29:33 UTC (rev 785)
@@ -609,3 +609,8 @@
     }
     return pools;
 }
+
+void FgfUtil::TakeReleasedByteArray(FdoFgfGeometryPools * pools, FdoByteArray * byteArray)
+{
+    pools->TakeReleasedByteArray(byteArray);
+}

Modified: branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.h
===================================================================
--- branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.h	2007-02-17 23:25:15 UTC (rev 784)
+++ branches/3.2.x/Fdo/Unmanaged/Src/Geometry/Fgf/Util.h	2007-02-19 23:29:33 UTC (rev 785)
@@ -206,6 +206,10 @@
     static FdoFgfGeometryPools * GetPoolsNoRef(
           FdoFgfGeometryPools *   privatePools);
 
+    // Wrapper around pools' byte array.  Some compilers (e.g. GNU 3.4.x)
+    // won't allow directly calling from a forward declaration in 
+    // FdoFgfGeometryImpl, so we make the call available here too.
+    static void TakeReleasedByteArray(FdoFgfGeometryPools * pools, FdoByteArray * byteArray);
 };
 
 #endif



More information about the fdo-commits mailing list