From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Mon, 18 Aug 2008 00:39:10 +0000
Subject: Formatting cleanup.
---
OpenSim/Data/NHibernate/LLQuaternionUserType.cs | 10 +++----
OpenSim/Data/NHibernate/LLVector3UserType.cs | 2 +-
OpenSim/Data/NHibernate/NHibernateAssetData.cs | 6 ++---
OpenSim/Data/NHibernate/NHibernateManager.cs | 2 +-
OpenSim/Data/NHibernate/NHibernateRegionData.cs | 36 ++++++++++++-------------
OpenSim/Data/NHibernate/NHibernateUserData.cs | 26 +++++++++---------
OpenSim/Data/NHibernate/Terrain.cs | 20 +++++++-------
7 files changed, 51 insertions(+), 51 deletions(-)
(limited to 'OpenSim/Data/NHibernate')
diff --git a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
index c4f3136..80fb9ff 100644
--- a/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
+++ b/OpenSim/Data/NHibernate/LLQuaternionUserType.cs
@@ -72,7 +72,7 @@ namespace OpenSim.Data.NHibernate
public object NullSafeGet(IDataReader rs, string[] names, object owner)
{
object quat = null;
-
+
int x = rs.GetOrdinal(names[0]);
int y = rs.GetOrdinal(names[1]);
int z = rs.GetOrdinal(names[2]);
@@ -105,10 +105,10 @@ namespace OpenSim.Data.NHibernate
public SqlType[] SqlTypes
{
- get { return new SqlType [] {
- NHibernateUtil.Single.SqlType,
- NHibernateUtil.Single.SqlType,
- NHibernateUtil.Single.SqlType,
+ get { return new SqlType [] {
+ NHibernateUtil.Single.SqlType,
+ NHibernateUtil.Single.SqlType,
+ NHibernateUtil.Single.SqlType,
NHibernateUtil.Single.SqlType
}; }
}
diff --git a/OpenSim/Data/NHibernate/LLVector3UserType.cs b/OpenSim/Data/NHibernate/LLVector3UserType.cs
index b040ca7d..d2df2c4 100644
--- a/OpenSim/Data/NHibernate/LLVector3UserType.cs
+++ b/OpenSim/Data/NHibernate/LLVector3UserType.cs
@@ -70,7 +70,7 @@ namespace OpenSim.Data.NHibernate
public object NullSafeGet(IDataReader rs, string[] names, object owner)
{
object vector = null;
-
+
int x = rs.GetOrdinal(names[0]);
int y = rs.GetOrdinal(names[1]);
int z = rs.GetOrdinal(names[2]);
diff --git a/OpenSim/Data/NHibernate/NHibernateAssetData.cs b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
index 2e9e897..400451f 100644
--- a/OpenSim/Data/NHibernate/NHibernateAssetData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateAssetData.cs
@@ -93,7 +93,7 @@ namespace OpenSim.Data.NHibernate
factory = cfg.BuildSessionFactory();
session = factory.OpenSession();
-
+
// This actually does the roll forward assembly stuff
Assembly assem = GetType().Assembly;
Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "AssetStore");
@@ -111,7 +111,7 @@ namespace OpenSim.Data.NHibernate
{
m_log.ErrorFormat("[NHIBERNATE] no such asset {0}", uuid);
return null;
- }
+ }
catch (Exception e)
{
m_log.Error("[NHIBERNATE] unexpected exception: ", e);
@@ -121,7 +121,7 @@ namespace OpenSim.Data.NHibernate
private void Save(AssetBase asset)
{
- try
+ try
{
// a is not used anywhere?
// AssetBase a = session.Load(typeof(AssetBase), asset.FullID) as AssetBase;
diff --git a/OpenSim/Data/NHibernate/NHibernateManager.cs b/OpenSim/Data/NHibernate/NHibernateManager.cs
index 4c5ec01..161ec1d 100644
--- a/OpenSim/Data/NHibernate/NHibernateManager.cs
+++ b/OpenSim/Data/NHibernate/NHibernateManager.cs
@@ -51,7 +51,7 @@ namespace OpenSim.Data.NHibernate
// "NHibernate.Driver.SqliteClientDriver";
// cfg.Properties[NHibernate.Cfg.Environment.ConnectionString] =
// "URI=file:opensim-nh.db,version=3";
-
+
// factory = cfg.BuildSessionFactory();
}
diff --git a/OpenSim/Data/NHibernate/NHibernateRegionData.cs b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
index 52db32d..9682d87 100644
--- a/OpenSim/Data/NHibernate/NHibernateRegionData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateRegionData.cs
@@ -89,10 +89,10 @@ namespace OpenSim.Data.NHibernate
using (MemoryStream stream =
HbmSerializer.Default.Serialize(Assembly.GetExecutingAssembly()))
cfg.AddInputStream(stream);
-
+
factory = cfg.BuildSessionFactory();
session = factory.OpenSession();
-
+
// This actually does the roll forward assembly stuff
Assembly assem = GetType().Assembly;
Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "RegionStore");
@@ -113,7 +113,7 @@ namespace OpenSim.Data.NHibernate
{
return null;
}
-
+
// This looks inefficient, but it turns out that it isn't
// based on trial runs with nhibernate 1.2
private void SaveOrUpdate(SceneObjectPart p)
@@ -164,7 +164,7 @@ namespace OpenSim.Data.NHibernate
/// the region UUID
public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID)
{
- try
+ try
{
foreach (SceneObjectPart part in obj.Children.Values)
{
@@ -173,7 +173,7 @@ namespace OpenSim.Data.NHibernate
}
session.Flush();
}
- catch (Exception e)
+ catch (Exception e)
{
m_log.Error("Can't save: ", e);
}
@@ -196,7 +196,7 @@ namespace OpenSim.Data.NHibernate
group.AddPart(p);
group.RootPart = p;
}
- else
+ else
{
group.AddPart(p);
}
@@ -232,7 +232,7 @@ namespace OpenSim.Data.NHibernate
{
Dictionary SOG = new Dictionary();
List ret = new List();
-
+
ICriteria criteria = session.CreateCriteria(typeof(SceneObjectPart));
criteria.Add(Expression.Eq("RegionID", regionUUID));
criteria.AddOrder( Order.Asc("ParentID") );
@@ -246,12 +246,12 @@ namespace OpenSim.Data.NHibernate
group.RootPart = p;
SOG.Add(p.ParentUUID, group);
}
- else
+ else
{
SOG[p.ParentUUID].AddPart(p);
}
// get the inventory
-
+
ICriteria InvCriteria = session.CreateCriteria(typeof(TaskInventoryItem));
InvCriteria.Add(Expression.Eq("ParentPartID", p.UUID));
IList inventory = new List();
@@ -263,7 +263,7 @@ namespace OpenSim.Data.NHibernate
if (inventory.Count > 0)
p.RestoreInventoryItems(inventory);
}
- foreach (SceneObjectGroup g in SOG.Values)
+ foreach (SceneObjectGroup g in SOG.Values)
{
ret.Add(g);
}
@@ -304,7 +304,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
public void RemoveLandObject(LLUUID globalID)
@@ -313,7 +313,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
public void StoreLandObject(ILandObject parcel)
@@ -322,7 +322,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
///
@@ -341,7 +341,7 @@ namespace OpenSim.Data.NHibernate
{
session.Flush();
}
-
+
///
/// Load a region banlist
///
@@ -373,7 +373,7 @@ namespace OpenSim.Data.NHibernate
}
///
- ///
+ ///
///
///
///
@@ -399,17 +399,17 @@ namespace OpenSim.Data.NHibernate
{
ICriteria criteria = session.CreateCriteria(typeof(TaskInventoryItem));
criteria.Add(Expression.Eq("ParentPartID", primID));
- try
+ try
{
foreach (TaskInventoryItem i in criteria.List())
{
session.Delete(i);
}
-
+
foreach (TaskInventoryItem i in items)
{
session.Save(i);
-
+
}
session.Flush();
}
diff --git a/OpenSim/Data/NHibernate/NHibernateUserData.cs b/OpenSim/Data/NHibernate/NHibernateUserData.cs
index bceae7c..c776474 100644
--- a/OpenSim/Data/NHibernate/NHibernateUserData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateUserData.cs
@@ -53,8 +53,8 @@ namespace OpenSim.Data.NHibernate
private ISessionFactory factory;
private ISession session;
- public override void Initialise()
- {
+ public override void Initialise()
+ {
m_log.Info("[NHibernateUserData]: " + Name + " cannot be default-initialized!");
throw new PluginNotInitialisedException (Name);
}
@@ -83,7 +83,7 @@ namespace OpenSim.Data.NHibernate
factory = cfg.BuildSessionFactory();
session = factory.OpenSession();
-
+
// This actually does the roll forward assembly stuff
Assembly assem = GetType().Assembly;
Migration m = new Migration((System.Data.Common.DbConnection)factory.ConnectionProvider.GetConnection(), assem, dialect, "UserStore");
@@ -97,7 +97,7 @@ namespace OpenSim.Data.NHibernate
{
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
}
- catch (ObjectNotFoundException)
+ catch (ObjectNotFoundException)
{
user = null;
}
@@ -109,12 +109,12 @@ namespace OpenSim.Data.NHibernate
{
UserProfileData user;
// TODO: I'm sure I'll have to do something silly here
- try
+ try
{
user = session.Load(typeof(UserProfileData), uuid) as UserProfileData;
user.CurrentAgent = GetAgentByUUID(uuid);
- }
- catch (ObjectNotFoundException)
+ }
+ catch (ObjectNotFoundException)
{
user = null;
}
@@ -144,12 +144,12 @@ namespace OpenSim.Data.NHibernate
}
else
{
- try
+ try
{
UserAgentData old = session.Load(typeof(UserAgentData), uuid) as UserAgentData;
session.Delete(old);
}
- catch (ObjectNotFoundException)
+ catch (ObjectNotFoundException)
{
}
session.Save(agent);
@@ -174,12 +174,12 @@ namespace OpenSim.Data.NHibernate
override public void AddNewUserAgent(UserAgentData agent)
{
- try
+ try
{
UserAgentData old = session.Load(typeof(UserAgentData), agent.ProfileID) as UserAgentData;
session.Delete(old);
}
- catch (ObjectNotFoundException)
+ catch (ObjectNotFoundException)
{
}
session.Save(agent);
@@ -287,9 +287,9 @@ namespace OpenSim.Data.NHibernate
public override void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance)
{
- if (appearance == null)
+ if (appearance == null)
return;
-
+
appearance.Owner = user;
bool exists = ExistsAppearance(user);
diff --git a/OpenSim/Data/NHibernate/Terrain.cs b/OpenSim/Data/NHibernate/Terrain.cs
index a95e45a..608f03e 100644
--- a/OpenSim/Data/NHibernate/Terrain.cs
+++ b/OpenSim/Data/NHibernate/Terrain.cs
@@ -32,21 +32,21 @@ using OpenSim.Framework;
using log4net;
using libsecondlife;
-namespace OpenSim.Data.NHibernate
+namespace OpenSim.Data.NHibernate
{
public class Terrain
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-
+
private double[,] map;
private LLUUID regionID;
-
+
public Terrain(LLUUID Region, double[,] array)
{
map = array;
regionID = Region;
}
-
+
public Terrain()
{
map = new double[Constants.RegionSize, Constants.RegionSize];
@@ -65,7 +65,7 @@ namespace OpenSim.Data.NHibernate
get { return serializeTerrain(map); }
set { map = parseTerrain(value); }
}
-
+
public double[,] Doubles
{
get {return map;}
@@ -76,7 +76,7 @@ namespace OpenSim.Data.NHibernate
{
double[,] terret = new double[256,256];
terret.Initialize();
-
+
MemoryStream str = new MemoryStream(data);
BinaryReader br = new BinaryReader(str);
try {
@@ -87,7 +87,7 @@ namespace OpenSim.Data.NHibernate
terret[x, y] = br.ReadDouble();
}
}
- }
+ }
catch (Exception e)
{
m_log.Error("Issue parsing Map", e);
@@ -99,7 +99,7 @@ namespace OpenSim.Data.NHibernate
{
MemoryStream str = new MemoryStream((int)(65536 * sizeof (double)));
BinaryWriter bw = new BinaryWriter(str);
-
+
// TODO: COMPATIBILITY - Add byte-order conversions
for (int x = 0; x < 256; x++)
{
@@ -108,11 +108,11 @@ namespace OpenSim.Data.NHibernate
double height = val[x, y];
if (height <= 0.0)
height = double.Epsilon;
-
+
bw.Write(height);
}
}
return str.ToArray();
}
}
-}
\ No newline at end of file
+}
--
cgit v1.1