From fef3b3689492dea63693c964bcdbec9f5137eb5e Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Mon, 21 Apr 2008 07:09:17 +0000 Subject: * Optimised using statements and namespace references across entire project (this took a while to run). --- .../DotNetEngine/Compiler/LSL/Compiler.cs | 10 +++++----- .../DotNetEngine/Compiler/LSL/LSL2CSConverter.cs | 22 +++++++++++----------- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/Compiler') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index e3013c9..fc38ef2 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs @@ -30,10 +30,10 @@ using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.IO; -using System.Reflection; using Microsoft.CSharp; -using Microsoft.VisualBasic; using Microsoft.JScript; +using Microsoft.VisualBasic; +using OpenSim.Region.Environment.Interfaces; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -62,8 +62,8 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL private bool WriteScriptSourceToDebugFile; private bool CompileWithDebugInformation; private bool CleanUpOldScriptsOnStartup; - private System.Collections.Generic.Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); - private System.Collections.Generic.Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary AllowedCompilers = new Dictionary(StringComparer.CurrentCultureIgnoreCase); + private Dictionary LanguageMapping = new Dictionary(StringComparer.CurrentCultureIgnoreCase); private string FilePrefix; private string ScriptEnginesPath = "ScriptEngines"; @@ -276,7 +276,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL if (enableCommanderLSL == true && l == enumCompileType.cs) { foreach (KeyValuePair com + ICommander> com in m_scriptEngine.World.GetCommanders()) { compileScript = com.Value.GenerateRuntimeAPI() + compileScript; diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs index 20c108d..0025b26 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/LSL2CSConverter.cs @@ -26,9 +26,9 @@ * */ +using System; using System.Collections.Generic; using System.Text.RegularExpressions; -using System; namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { @@ -61,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL public string Convert(string Script) { quotes.Clear(); - string Return = System.String.Empty; + string Return = String.Empty; Script = " \r\n" + Script; // @@ -77,12 +77,12 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // temporarily replace quotes so we can work our magic on the script without // always considering if we are inside our outside quotes's // TODO: Does this work on half-quotes in strings? ;) - string _Script = System.String.Empty; + string _Script = String.Empty; string C; bool in_quote = false; bool quote_replaced = false; string quote_replacement_string = "Q_U_O_T_E_REPLACEMENT_"; - string quote = System.String.Empty; + string quote = String.Empty; bool last_was_escape = false; int quote_replaced_count = 0; for (int p = 0; p < Script.Length; p++) @@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL } else { - if (quote == System.String.Empty) + if (quote == String.Empty) { // We didn't replace quote, probably because of empty string? _Script += quote_replacement_string + @@ -111,7 +111,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL quotes.Add( quote_replacement_string + quote_replaced_count.ToString().PadLeft(5, "0".ToCharArray()[0]), quote); - quote = System.String.Empty; + quote = String.Empty; } break; } @@ -155,10 +155,10 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL // int ilevel = 0; int lastlevel = 0; - string ret = System.String.Empty; - string cache = System.String.Empty; + string ret = String.Empty; + string cache = String.Empty; bool in_state = false; - string current_statename = System.String.Empty; + string current_statename = String.Empty; for (int p = 0; p < Script.Length; p++) { C = Script.Substring(p, 1); @@ -319,9 +319,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL { state_events.Add(statea, convertnametoFlag(eventa)); } - System.Console.WriteLine("State:" + statea + ", event: " + eventa); + Console.WriteLine("State:" + statea + ", event: " + eventa); } - System.Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); + Console.WriteLine("Matches:" + eventmatches.GetUpperBound(0)); // Add namespace, class name and inheritance // Looking *ONLY* for state entry events -- cgit v1.1