From b25f9f322cdbcde7fd8c043137bf07992e5ef318 Mon Sep 17 00:00:00 2001
From: Adam Frisby
Date: Tue, 15 Jan 2008 02:09:55 +0000
Subject: * Mother of all commits: * Cleaned up copyright notices in
AssemblyInfo.cs's * Added Copyright headers to a bunch of files missing them
* Replaced several common string instances with a static constant to prevent
reallocation of the same strings thousands of times. "" -> String.Empty is
the first such candidate.
---
OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 2 +-
OpenSim/Region/Environment/Scenes/Scene.cs | 10 +++++-----
OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | 2 +-
OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | 4 ++--
OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | 4 ++--
OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 8 ++++----
OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs | 6 +++---
.../Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | 6 +++---
8 files changed, 21 insertions(+), 21 deletions(-)
(limited to 'OpenSim/Region/Environment/Scenes')
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index db3da48..31bd0b3 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -376,7 +376,7 @@ namespace OpenSim.Region.Environment.Scenes
InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
if (item != null)
{
- if (newName != "")
+ if (newName != System.String.Empty)
{
item.inventoryName = newName;
}
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs
index 575fe01..43486e8 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.cs
@@ -389,7 +389,7 @@ namespace OpenSim.Region.Environment.Scenes
m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed);
MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes");
m_restartTimer.Start();
- SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), "", RegionInfo.RegionName + ": Restarting in 2 Minutes");
+ SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes");
//SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes");
}
}
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Environment.Scenes
if (m_RestartTimerCounter <= m_incrementsof15seconds)
{
if (m_RestartTimerCounter == 4 || m_RestartTimerCounter == 6 || m_RestartTimerCounter == 7)
- SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), "", RegionInfo.RegionName + ": Restarting in " +
+ SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in " +
((8 - m_RestartTimerCounter) * 15) + " seconds");
// SendGeneralAlert(RegionInfo.RegionName + ": Restarting in " + ((8 - m_RestartTimerCounter)*15) +
@@ -1408,7 +1408,7 @@ namespace OpenSim.Region.Environment.Scenes
{
if (regionHandle == m_regInfo.RegionHandle)
{
- if (agent.CapsPath != "")
+ if (agent.CapsPath != String.Empty)
{
Caps cap =
new Caps(AssetCache, httpListener, m_regInfo.ExternalHostName, httpListener.Port,
@@ -2004,7 +2004,7 @@ namespace OpenSim.Region.Environment.Scenes
private string CombineParams(string[] commandParams, int pos)
{
- string result = "";
+ string result = String.Empty;
for (int i = pos; i < commandParams.Length; i++)
{
result += commandParams[i] + " ";
@@ -2253,7 +2253,7 @@ namespace OpenSim.Region.Environment.Scenes
///
/// AvatarID to lookup
///
- public bool PresenceChildStatus(LLUUID avatarID)
+ public override bool PresenceChildStatus(LLUUID avatarID)
{
ScenePresence cp = GetScenePresence(avatarID);
return cp.IsChildAgent;
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
index 3942397..29747c1 100644
--- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs
@@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
public KillObjectDelegate KillObject;
- public string _debugRegionName = "";
+ public string _debugRegionName = String.Empty;
public string debugRegionName
{
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
index 879e4a3..ffc72c9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs
@@ -1114,7 +1114,7 @@ namespace OpenSim.Region.Environment.Scenes
{
return part.Name;
}
- return "";
+ return String.Empty;
}
public string GetPartDescription(uint localID)
@@ -1124,7 +1124,7 @@ namespace OpenSim.Region.Environment.Scenes
{
return part.Description;
}
- return "";
+ return String.Empty;
}
///
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
index 1dd7e35..fc74c4e 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
{
public partial class SceneObjectPart : IScriptHost
{
- private string m_inventoryFileName = "";
+ private string m_inventoryFileName = String.Empty;
///
/// The inventory folder for this prim
@@ -334,7 +334,7 @@ namespace OpenSim.Region.Environment.Scenes
public class InventoryStringBuilder
{
- public string BuildString = "";
+ public string BuildString = String.Empty;
public InventoryStringBuilder(LLUUID folderID, LLUUID parentID)
{
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
index 4456182..f2594a9 100644
--- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Scenes
set { m_acceleration = value; }
}
- private string m_description = "";
+ private string m_description = String.Empty;
public string Description
{
@@ -418,7 +418,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- private string m_text = "";
+ private string m_text = String.Empty;
public Vector3 SitTargetPosition
{
@@ -440,7 +440,7 @@ namespace OpenSim.Region.Environment.Scenes
}
}
- private string m_sitName = "";
+ private string m_sitName = String.Empty;
public string SitName
{
@@ -448,7 +448,7 @@ namespace OpenSim.Region.Environment.Scenes
set { m_sitName = value; }
}
- private string m_touchName = "";
+ private string m_touchName = String.Empty;
public string TouchName
{
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
index c1bf72b..58cf4c6 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs
@@ -44,19 +44,19 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
public string SitName
{
- get { return ""; }
+ get { return String.Empty; }
set { }
}
public string TouchName
{
- get { return ""; }
+ get { return String.Empty; }
set { }
}
public string Description
{
- get { return ""; }
+ get { return String.Empty; }
set { }
}
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs
index 5dbe500..74f9358 100644
--- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs
+++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
//}
//catch (Exception e)
//{
- // m_log.Error("ScriptEngine", "Error loading assembly \"" + FileName + "\": " + e.ToString());
+ // m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString());
//}
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
//}
//catch (Exception e)
//{
- // m_log.Error("ScriptEngine", "Error initializing type \"" + NameSpace + "\" from \"" + FileName + "\": " + e.ToString());
+ // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
//}
ScriptEngineInterface ret;
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting
//}
//catch (Exception e)
//{
- // m_log.Error("ScriptEngine", "Error initializing type \"" + NameSpace + "\" from \"" + FileName + "\": " + e.ToString());
+ // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString());
//}
return ret;
--
cgit v1.1