diff options
author | Adam Frisby | 2008-01-15 02:09:55 +0000 |
---|---|---|
committer | Adam Frisby | 2008-01-15 02:09:55 +0000 |
commit | b25f9f322cdbcde7fd8c043137bf07992e5ef318 (patch) | |
tree | 7c1a5115b2849dfe388b825dd271271d347f9574 /OpenSim/Region/Application | |
parent | Set svn:eol-style. (diff) | |
download | opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.zip opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.gz opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.bz2 opensim-SC_OLD-b25f9f322cdbcde7fd8c043137bf07992e5ef318.tar.xz |
* 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.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Application/Application.cs | 4 | ||||
-rw-r--r-- | OpenSim/Region/Application/OpenSimMain.cs | 22 |
2 files changed, 13 insertions, 13 deletions
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 | |||
45 | 45 | ||
46 | 46 | ||
47 | Console.Write("Performing compatibility checks... "); | 47 | Console.Write("Performing compatibility checks... "); |
48 | string supported = ""; | 48 | string supported = String.Empty; |
49 | if (Util.IsEnvironmentSupported(ref supported)) | 49 | if (Util.IsEnvironmentSupported(ref supported)) |
50 | { | 50 | { |
51 | Console.WriteLine(" Environment is compatible.\n"); | 51 | Console.WriteLine(" Environment is compatible.\n"); |
@@ -90,7 +90,7 @@ namespace OpenSim | |||
90 | // TODO: Add config option to allow users to turn off error reporting | 90 | // TODO: Add config option to allow users to turn off error reporting |
91 | // TODO: Post error report (disabled for now) | 91 | // TODO: Post error report (disabled for now) |
92 | 92 | ||
93 | string msg = ""; | 93 | string msg = String.Empty; |
94 | msg += "\r\n"; | 94 | msg += "\r\n"; |
95 | msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; | 95 | msg += "APPLICATION EXCEPTION DETECTED: " + e.ToString() + "\r\n"; |
96 | msg += "\r\n"; | 96 | 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 | |||
172 | config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll"); | 172 | config.Set("storage_plugin", "OpenSim.Framework.Data.SQLite.dll"); |
173 | config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); | 173 | config.Set("storage_connection_string", "URI=file:OpenSim.db,version=3"); |
174 | config.Set("storage_prim_inventories_experimental", false); | 174 | config.Set("storage_prim_inventories_experimental", false); |
175 | config.Set("startup_console_commands_file", ""); | 175 | config.Set("startup_console_commands_file", String.Empty); |
176 | config.Set("shutdown_console_commands_file", ""); | 176 | config.Set("shutdown_console_commands_file", String.Empty); |
177 | config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); | 177 | config.Set("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); |
178 | config.Set("asset_database", "sqlite"); | 178 | config.Set("asset_database", "sqlite"); |
179 | } | 179 | } |
@@ -252,8 +252,8 @@ namespace OpenSim | |||
252 | m_storagePersistPrimInventories | 252 | m_storagePersistPrimInventories |
253 | = startupConfig.GetBoolean("storage_prim_inventories_experimental", false); | 253 | = startupConfig.GetBoolean("storage_prim_inventories_experimental", false); |
254 | 254 | ||
255 | m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", ""); | 255 | m_startupCommandsFile = startupConfig.GetString("startup_console_commands_file", String.Empty); |
256 | m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", ""); | 256 | m_shutdownCommandsFile = startupConfig.GetString("shutdown_console_commands_file", String.Empty); |
257 | 257 | ||
258 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); | 258 | m_scriptEngine = startupConfig.GetString("script_engine", "OpenSim.Region.ScriptEngine.DotNetEngine.dll"); |
259 | 259 | ||
@@ -374,7 +374,7 @@ namespace OpenSim | |||
374 | // } | 374 | // } |
375 | 375 | ||
376 | //Run Startup Commands | 376 | //Run Startup Commands |
377 | if (m_startupCommandsFile != "") | 377 | if (m_startupCommandsFile != String.Empty) |
378 | { | 378 | { |
379 | RunCommandScript(m_startupCommandsFile); | 379 | RunCommandScript(m_startupCommandsFile); |
380 | } | 380 | } |
@@ -421,7 +421,7 @@ namespace OpenSim | |||
421 | SQLAssetServer sqlAssetServer = new SQLAssetServer("OpenSim.Framework.Data.MSSQL.dll"); | 421 | SQLAssetServer sqlAssetServer = new SQLAssetServer("OpenSim.Framework.Data.MSSQL.dll"); |
422 | sqlAssetServer.LoadDefaultAssets(); | 422 | sqlAssetServer.LoadDefaultAssets(); |
423 | assetServer = sqlAssetServer; | 423 | assetServer = sqlAssetServer; |
424 | //assetServer = new GridAssetClient(""); | 424 | //assetServer = new GridAssetClient(String.Empty); |
425 | } | 425 | } |
426 | else | 426 | else |
427 | { | 427 | { |
@@ -585,7 +585,7 @@ namespace OpenSim | |||
585 | /// </summary> | 585 | /// </summary> |
586 | public virtual void Shutdown() | 586 | public virtual void Shutdown() |
587 | { | 587 | { |
588 | if (m_startupCommandsFile != "") | 588 | if (m_startupCommandsFile != String.Empty) |
589 | { | 589 | { |
590 | RunCommandScript(m_shutdownCommandsFile); | 590 | RunCommandScript(m_shutdownCommandsFile); |
591 | } | 591 | } |
@@ -622,10 +622,10 @@ namespace OpenSim | |||
622 | if (File.Exists(fileName)) | 622 | if (File.Exists(fileName)) |
623 | { | 623 | { |
624 | StreamReader readFile = File.OpenText(fileName); | 624 | StreamReader readFile = File.OpenText(fileName); |
625 | string currentCommand = ""; | 625 | string currentCommand = String.Empty; |
626 | while ((currentCommand = readFile.ReadLine()) != null) | 626 | while ((currentCommand = readFile.ReadLine()) != null) |
627 | { | 627 | { |
628 | if (currentCommand != "") | 628 | if (currentCommand != String.Empty) |
629 | { | 629 | { |
630 | MainLog.Instance.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); | 630 | MainLog.Instance.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); |
631 | MainLog.Instance.MainLogRunCommand(currentCommand); | 631 | MainLog.Instance.MainLogRunCommand(currentCommand); |
@@ -645,7 +645,7 @@ namespace OpenSim | |||
645 | /// <param name="cmdparams">Additional arguments passed to the command</param> | 645 | /// <param name="cmdparams">Additional arguments passed to the command</param> |
646 | public void RunCmd(string command, string[] cmdparams) | 646 | public void RunCmd(string command, string[] cmdparams) |
647 | { | 647 | { |
648 | string result = ""; | 648 | string result = String.Empty; |
649 | 649 | ||
650 | switch (command) | 650 | switch (command) |
651 | { | 651 | { |
@@ -982,7 +982,7 @@ namespace OpenSim | |||
982 | 982 | ||
983 | private string CombineParams(string[] commandParams, int pos) | 983 | private string CombineParams(string[] commandParams, int pos) |
984 | { | 984 | { |
985 | string result = ""; | 985 | string result = String.Empty; |
986 | for (int i = pos; i < commandParams.Length; i++) | 986 | for (int i = pos; i < commandParams.Length; i++) |
987 | { | 987 | { |
988 | result += commandParams[i] + " "; | 988 | result += commandParams[i] + " "; |