From 523190377861292dfecdaddebe1204301a0c7912 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Thu, 1 May 2008 16:03:53 +0000
Subject: * In ur code. Making it static. * Converted a bunch of functions to
static functions.
---
OpenSim/Data/SQLite/SQLiteAssetData.cs | 10 ++++-----
OpenSim/Data/SQLite/SQLiteInventoryStore.cs | 14 ++++++------
OpenSim/Data/SQLite/SQLiteRegionData.cs | 34 ++++++++++++++---------------
OpenSim/Data/SQLite/SQLiteUserData.cs | 2 +-
4 files changed, 30 insertions(+), 30 deletions(-)
(limited to 'OpenSim/Data/SQLite')
diff --git a/OpenSim/Data/SQLite/SQLiteAssetData.cs b/OpenSim/Data/SQLite/SQLiteAssetData.cs
index db4848a..fa5d5e2 100644
--- a/OpenSim/Data/SQLite/SQLiteAssetData.cs
+++ b/OpenSim/Data/SQLite/SQLiteAssetData.cs
@@ -135,7 +135,7 @@ namespace OpenSim.Data.SQLite
}
- private void LogAssetLoad(AssetBase asset)
+ private static void LogAssetLoad(AssetBase asset)
{
string temporary = asset.Temporary ? "Temporary" : "Stored";
string local = asset.Local ? "Local" : "Remote";
@@ -197,7 +197,7 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private DataTable createAssetsTable()
+ private static DataTable createAssetsTable()
{
DataTable assets = new DataTable("assets");
@@ -222,7 +222,7 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private AssetBase buildAsset(IDataReader row)
+ private static AssetBase buildAsset(IDataReader row)
{
// TODO: this doesn't work yet because something more
// interesting has to be done to actually get these values
@@ -250,14 +250,14 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private void InitDB(SqliteConnection conn)
+ private static void InitDB(SqliteConnection conn)
{
string createAssets = SQLiteUtil.defineTable(createAssetsTable());
SqliteCommand pcmd = new SqliteCommand(createAssets, conn);
pcmd.ExecuteNonQuery();
}
- private bool TestTables(SqliteConnection conn)
+ private static bool TestTables(SqliteConnection conn)
{
SqliteCommand cmd = new SqliteCommand(assetSelect, conn);
SqliteDataAdapter pDa = new SqliteDataAdapter(cmd);
diff --git a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
index 4b28795..40978da 100644
--- a/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
+++ b/OpenSim/Data/SQLite/SQLiteInventoryStore.cs
@@ -124,7 +124,7 @@ namespace OpenSim.Data.SQLite
return item;
}
- private void fillItemRow(DataRow row, InventoryItemBase item)
+ private static void fillItemRow(DataRow row, InventoryItemBase item)
{
row["UUID"] = Util.ToRawUuidString(item.ID);
row["assetID"] = Util.ToRawUuidString(item.AssetID);
@@ -576,7 +576,7 @@ namespace OpenSim.Data.SQLite
return inv;
}
- private DataTable createInventoryFoldersTable()
+ private static DataTable createInventoryFoldersTable()
{
DataTable fol = new DataTable("inventoryfolders");
@@ -625,7 +625,7 @@ namespace OpenSim.Data.SQLite
}
}
- private InventoryFolderBase buildFolder(DataRow row)
+ private static InventoryFolderBase buildFolder(DataRow row)
{
InventoryFolderBase folder = new InventoryFolderBase();
folder.ID = new LLUUID((string) row["UUID"]);
@@ -637,7 +637,7 @@ namespace OpenSim.Data.SQLite
return folder;
}
- private void fillFolderRow(DataRow row, InventoryFolderBase folder)
+ private static void fillFolderRow(DataRow row, InventoryFolderBase folder)
{
row["UUID"] = Util.ToRawUuidString(folder.ID);
row["name"] = folder.Name;
@@ -647,7 +647,7 @@ namespace OpenSim.Data.SQLite
row["version"] = folder.Version;
}
- private void moveFolderRow(DataRow row, InventoryFolderBase folder)
+ private static void moveFolderRow(DataRow row, InventoryFolderBase folder)
{
row["UUID"] = Util.ToRawUuidString(folder.ID);
row["parentID"] = Util.ToRawUuidString(folder.ParentID);
@@ -659,7 +659,7 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private void InitDB(SqliteConnection conn)
+ private static void InitDB(SqliteConnection conn)
{
string createInventoryItems = defineTable(createInventoryItemsTable());
string createInventoryFolders = defineTable(createInventoryFoldersTable());
@@ -671,7 +671,7 @@ namespace OpenSim.Data.SQLite
scmd.ExecuteNonQuery();
}
- private bool TestTables(SqliteConnection conn)
+ private static bool TestTables(SqliteConnection conn)
{
SqliteCommand invItemsSelectCmd = new SqliteCommand(invItemsSelect, conn);
SqliteDataAdapter pDa = new SqliteDataAdapter(invItemsSelectCmd);
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index ea12a48..9a610a4 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -572,13 +572,13 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private void createCol(DataTable dt, string name, Type type)
+ private static void createCol(DataTable dt, string name, Type type)
{
DataColumn col = new DataColumn(name, type);
dt.Columns.Add(col);
}
- private DataTable createTerrainTable()
+ private static DataTable createTerrainTable()
{
DataTable terrain = new DataTable("terrain");
@@ -589,7 +589,7 @@ namespace OpenSim.Data.SQLite
return terrain;
}
- private DataTable createPrimTable()
+ private static DataTable createPrimTable()
{
DataTable prims = new DataTable("prims");
@@ -653,7 +653,7 @@ namespace OpenSim.Data.SQLite
return prims;
}
- private DataTable createShapeTable()
+ private static DataTable createShapeTable()
{
DataTable shapes = new DataTable("primshapes");
createCol(shapes, "UUID", typeof (String));
@@ -695,7 +695,7 @@ namespace OpenSim.Data.SQLite
return shapes;
}
- private DataTable createItemsTable()
+ private static DataTable createItemsTable()
{
DataTable items = new DataTable("primitems");
@@ -727,7 +727,7 @@ namespace OpenSim.Data.SQLite
return items;
}
- private DataTable createLandTable()
+ private static DataTable createLandTable()
{
DataTable land = new DataTable("land");
createCol(land, "UUID", typeof (String));
@@ -771,7 +771,7 @@ namespace OpenSim.Data.SQLite
return land;
}
- private DataTable createLandAccessListTable()
+ private static DataTable createLandAccessListTable()
{
DataTable landaccess = new DataTable("landaccesslist");
createCol(landaccess, "LandUUID", typeof (String));
@@ -901,7 +901,7 @@ namespace OpenSim.Data.SQLite
///
///
///
- private TaskInventoryItem buildItem(DataRow row)
+ private static TaskInventoryItem buildItem(DataRow row)
{
TaskInventoryItem taskItem = new TaskInventoryItem();
@@ -1008,7 +1008,7 @@ namespace OpenSim.Data.SQLite
return newData;
}
- private ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
+ private static ParcelManager.ParcelAccessEntry buildLandAccessData(DataRow row)
{
ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
entry.AgentID = new LLUUID((string) row["AccessUUID"]);
@@ -1017,7 +1017,7 @@ namespace OpenSim.Data.SQLite
return entry;
}
- private Array serializeTerrain(double[,] val)
+ private static Array serializeTerrain(double[,] val)
{
MemoryStream str = new MemoryStream(65536*sizeof (double));
BinaryWriter bw = new BinaryWriter(str);
@@ -1046,7 +1046,7 @@ namespace OpenSim.Data.SQLite
// row["Heightfield"] = str.ToArray();
// }
- private void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID)
+ private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID)
{
row["UUID"] = Util.ToRawUuidString(prim.UUID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1106,7 +1106,7 @@ namespace OpenSim.Data.SQLite
row["SitTargetOrientZ"] = sitTargetOrient.Z;
}
- private void fillItemRow(DataRow row, TaskInventoryItem taskItem)
+ private static void fillItemRow(DataRow row, TaskInventoryItem taskItem)
{
row["itemID"] = taskItem.ItemID;
row["primID"] = taskItem.ParentPartID;
@@ -1130,7 +1130,7 @@ namespace OpenSim.Data.SQLite
row["groupPermissions"] = taskItem.GroupMask;
}
- private void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
+ private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
{
row["UUID"] = Util.ToRawUuidString(land.globalID);
row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
@@ -1169,7 +1169,7 @@ namespace OpenSim.Data.SQLite
row["AuthbuyerID"] = Util.ToRawUuidString(land.authBuyerID);
}
- private void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID)
+ private static void fillLandAccessRow(DataRow row, ParcelManager.ParcelAccessEntry entry, LLUUID parcelID)
{
row["LandUUID"] = Util.ToRawUuidString(parcelID);
row["AccessUUID"] = Util.ToRawUuidString(entry.AgentID);
@@ -1242,7 +1242,7 @@ namespace OpenSim.Data.SQLite
return s;
}
- private void fillShapeRow(DataRow row, SceneObjectPart prim)
+ private static void fillShapeRow(DataRow row, SceneObjectPart prim)
{
PrimitiveBaseShape s = prim.Shape;
row["UUID"] = Util.ToRawUuidString(prim.UUID);
@@ -1713,7 +1713,7 @@ namespace OpenSim.Data.SQLite
*
**********************************************************************/
- private DbType dbtypeFromType(Type type)
+ private static DbType dbtypeFromType(Type type)
{
if (type == typeof (String))
{
@@ -1747,7 +1747,7 @@ namespace OpenSim.Data.SQLite
// this is something we'll need to implement for each db
// slightly differently.
- private string sqliteType(Type type)
+ private static string sqliteType(Type type)
{
if (type == typeof (String))
{
diff --git a/OpenSim/Data/SQLite/SQLiteUserData.cs b/OpenSim/Data/SQLite/SQLiteUserData.cs
index ec90f34..7f017b7 100644
--- a/OpenSim/Data/SQLite/SQLiteUserData.cs
+++ b/OpenSim/Data/SQLite/SQLiteUserData.cs
@@ -752,7 +752,7 @@ namespace OpenSim.Data.SQLite
}
- private void InitDB(SqliteConnection conn)
+ private static void InitDB(SqliteConnection conn)
{
string createUsers = SQLiteUtil.defineTable(createUsersTable());
string createFriends = SQLiteUtil.defineTable(createUserFriendsTable());
--
cgit v1.1