From ac94dc8a14e9087c3ba43bd7a2f2a74f957a975c Mon Sep 17 00:00:00 2001
From: Robert Adams
Date: Mon, 4 Nov 2013 22:06:20 -0800
Subject: varregion: remove unused terrain serialization code in SQLite and
 PGSQL modules

---
 OpenSim/Data/PGSQL/PGSQLSimulationData.cs   | 24 ------------------------
 OpenSim/Data/SQLite/SQLiteSimulationData.cs | 16 ----------------
 2 files changed, 40 deletions(-)

(limited to 'OpenSim/Data')

diff --git a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
index 34eb038..b063607 100644
--- a/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
+++ b/OpenSim/Data/PGSQL/PGSQLSimulationData.cs
@@ -1364,30 +1364,6 @@ namespace OpenSim.Data.PGSQL
         #region Private Methods
 
         /// <summary>
-        /// Serializes the terrain data for storage in DB.
-        /// </summary>
-        /// <param name="val">terrain data</param>
-        /// <returns></returns>
-        private static Array serializeTerrain(double[,] val)
-        {
-            MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize) * sizeof(double));
-            BinaryWriter bw = new BinaryWriter(str);
-
-            // TODO: COMPATIBILITY - Add byte-order conversions
-            for (int x = 0; x < (int)Constants.RegionSize; x++)
-                for (int y = 0; y < (int)Constants.RegionSize; y++)
-                {
-                    double height = val[x, y];
-                    if (height == 0.0)
-                        height = double.Epsilon;
-
-                    bw.Write(height);
-                }
-
-            return str.ToArray();
-        }
-
-        /// <summary>
         /// Stores new regionsettings.
         /// </summary>
         /// <param name="regionSettings">The region settings.</param>
diff --git a/OpenSim/Data/SQLite/SQLiteSimulationData.cs b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
index dac4450..5a34f09 100644
--- a/OpenSim/Data/SQLite/SQLiteSimulationData.cs
+++ b/OpenSim/Data/SQLite/SQLiteSimulationData.cs
@@ -2009,22 +2009,6 @@ namespace OpenSim.Data.SQLite
             return entry;
         }
 
-        //         private void fillTerrainRow(DataRow row, UUID regionUUID, int rev, double[,] val)
-        //         {
-        //             row["RegionUUID"] = regionUUID;
-        //             row["Revision"] = rev;
-
-        //             MemoryStream str = new MemoryStream(((int)Constants.RegionSize * (int)Constants.RegionSize)*sizeof (double));
-        //             BinaryWriter bw = new BinaryWriter(str);
-
-        //             // TODO: COMPATIBILITY - Add byte-order conversions
-        //             for (int x = 0; x < (int)Constants.RegionSize; x++)
-        //                 for (int y = 0; y < (int)Constants.RegionSize; y++)
-        //                     bw.Write(val[x, y]);
-
-        //             row["Heightfield"] = str.ToArray();
-        //         }
-
         /// <summary>
         ///
         /// </summary>
-- 
cgit v1.1