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/Application/Application.cs | 4 ++-- OpenSim/Region/Application/OpenSimMain.cs | 22 +++++++++++----------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'OpenSim/Region/Application') diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index ca1e9c9..d253775 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs @@ -45,7 +45,7 @@ namespace OpenSim Console.Write("Performing compatibility checks... "); - string supported = ""; + string supported = String.Empty; if (Util.IsEnvironmentSupported(ref supported)) { Console.WriteLine(" Environment is compatible.\n"); @@ -90,7 +90,7 @@ namespace OpenSim // TODO: Add config option to allow users to turn off error reporting // TODO: Post error report (disabled for now) - string msg = ""; + string msg = String.Empty; msg += "\r\n"; msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; msg += "\r\n"; diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 7249322..7d83df7 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs @@ -172,8 +172,8 @@ namespace OpenSim config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll"); config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); config.Set("storage_prim_inventories_experimental", false); - config.Set("startup_console_commands_file", ""); - config.Set("shutdown_console_commands_file", ""); + config.Set("startup_console_commands_file", String.Empty); + config.Set("shutdown_console_commands_file", String.Empty); config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); config.Set("asset_database", "sqlite"); } @@ -252,8 +252,8 @@ namespace OpenSim m_storagePersistPrimInventories = startupConfig.GetBoolean("storage_prim_inventories_experimental", false); - m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", ""); - m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", ""); + m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); + m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); @@ -374,7 +374,7 @@ namespace OpenSim // } //Run Startup Commands - if (m_startupCommandsFile != "") + if (m_startupCommandsFile != String.Empty) { RunCommandScript(m_startupCommandsFile); } @@ -421,7 +421,7 @@ namespace OpenSim SQLAssetServer sqlAssetServer = new SQLAssetServer("OpenSim.Framework.Data.MSSQL.dll"); sqlAssetServer.LoadDefaultAssets(); assetServer = sqlAssetServer; - //assetServer = new GridAssetClient(""); + //assetServer = new GridAssetClient(String.Empty); } else { @@ -585,7 +585,7 @@ namespace OpenSim /// public virtual void Shutdown() { - if (m_startupCommandsFile != "") + if (m_startupCommandsFile != String.Empty) { RunCommandScript(m_shutdownCommandsFile); } @@ -622,10 +622,10 @@ namespace OpenSim if (File.Exists(fileName)) { StreamReader readFile = File.OpenText(fileName); - string currentCommand = ""; + string currentCommand = String.Empty; while ((currentCommand = readFile.ReadLine()) != null) { - if (currentCommand != "") + if (currentCommand != String.Empty) { MainLog.Instance.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); MainLog.Instance.MainLogRunCommand(currentCommand); @@ -645,7 +645,7 @@ namespace OpenSim /// Additional arguments passed to the command public void RunCmd(string command, string[] cmdparams) { - string result = ""; + string result = String.Empty; switch (command) { @@ -982,7 +982,7 @@ namespace OpenSim private string CombineParams(string[] commandParams, int pos) { - string result = ""; + string result = String.Empty; for (int i = pos; i < commandParams.Length; i++) { result += commandParams[i] + " "; -- cgit v1.1