* 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.
This commit is contained in:
Adam Frisby
2008-01-15 02:09:55 +00:00
parent 84c3a317c1
commit b25f9f322c
121 changed files with 973 additions and 453 deletions

View File

@@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules
string bornOn = "Before now";
string flAbout = "First life? What is one of those? OpenSim is my life!";
LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000");
remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "",
remoteClient.SendAvatarProperties(avatarID, about, bornOn, System.String.Empty, flAbout, 0, LLUUID.Zero, LLUUID.Zero, System.String.Empty,
partner);
}
}

View File

@@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules
m_ChannelKey = channelKey;
m_MessageID = LLUUID.Random();
m_processed = false;
m_resp = "";
m_resp = String.Empty;
}
public bool IsProcessed()

View File

@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules
public class XferDownLoad
{
public byte[] Data = new byte[0];
public string FileName = "";
public string FileName = String.Empty;
public ulong XferID = 0;
public int DataPointer = 0;
public uint Packet = 0;

View File

@@ -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;
}

View File

@@ -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
/// </summary>
/// <param name="avatarID">AvatarID to lookup</param>
/// <returns></returns>
public bool PresenceChildStatus(LLUUID avatarID)
public override bool PresenceChildStatus(LLUUID avatarID)
{
ScenePresence cp = GetScenePresence(avatarID);
return cp.IsChildAgent;

View File

@@ -54,7 +54,7 @@ namespace OpenSim.Region.Environment.Scenes
public KillObjectDelegate KillObject;
public string _debugRegionName = "";
public string _debugRegionName = String.Empty;
public string debugRegionName
{

View File

@@ -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;
}
/// <summary>

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Scenes
{
public partial class SceneObjectPart : IScriptHost
{
private string m_inventoryFileName = "";
private string m_inventoryFileName = String.Empty;
/// <summary>
/// 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)
{

View File

@@ -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
{

View File

@@ -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 { }
}

View File

@@ -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;

View File

@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Types
public string[] GetNeighbours(string nodeName)
{
string[] retVal = new string[1];
retVal[0] = "";
retVal[0] = System.String.Empty;
return retVal;
}
}