diff options
author | Dr Scofield | 2008-06-27 23:03:39 +0000 |
---|---|---|
committer | Dr Scofield | 2008-06-27 23:03:39 +0000 |
commit | 748f72326d9a295958bc9ba63bbb1a5d39030ef7 (patch) | |
tree | 58f2c9a5f6b8ffab5ad3621070aa17cb1c1e3e6b /OpenSim/Region/ScriptEngine/Shared/CodeTools | |
parent | more warnings to go. (diff) | |
download | opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.zip opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.gz opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.bz2 opensim-SC_OLD-748f72326d9a295958bc9ba63bbb1a5d39030ef7.tar.xz |
last round of warning squashing. calling it a day now.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs | 6 |
2 files changed, 11 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs index 841ed26..d54d2f5 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/Compiler.cs | |||
@@ -40,8 +40,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
40 | { | 40 | { |
41 | public class Compiler | 41 | public class Compiler |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log | 43 | // private static readonly log4net.ILog m_log |
44 | = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | 45 | ||
46 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. | 46 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. |
47 | // * Compiles C#-code into an assembly | 47 | // * Compiles C#-code into an assembly |
@@ -79,7 +79,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
79 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp | 79 | private static CSharpCodeProvider YPcodeProvider = new CSharpCodeProvider(); // YP is translated into CSharp |
80 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); | 80 | private static YP2CSConverter YP_Converter = new YP2CSConverter(); |
81 | 81 | ||
82 | private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files | 82 | // private static int instanceID = new Random().Next(0, int.MaxValue); // Unique number to use on our compiled files |
83 | private static UInt64 scriptCompileCounter = 0; // And a counter | 83 | private static UInt64 scriptCompileCounter = 0; // And a counter |
84 | 84 | ||
85 | public IScriptEngine m_scriptEngine; | 85 | public IScriptEngine m_scriptEngine; |
@@ -273,7 +273,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
273 | { | 273 | { |
274 | Directory.CreateDirectory(ScriptEnginesPath); | 274 | Directory.CreateDirectory(ScriptEnginesPath); |
275 | } | 275 | } |
276 | catch (Exception ex) | 276 | catch (Exception) |
277 | { | 277 | { |
278 | } | 278 | } |
279 | } | 279 | } |
@@ -285,7 +285,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
285 | { | 285 | { |
286 | Directory.CreateDirectory(ScriptEnginesPath); | 286 | Directory.CreateDirectory(ScriptEnginesPath); |
287 | } | 287 | } |
288 | catch (Exception ex) | 288 | catch (Exception) |
289 | { | 289 | { |
290 | } | 290 | } |
291 | } | 291 | } |
@@ -486,7 +486,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
486 | // } | 486 | // } |
487 | 487 | ||
488 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); | 488 | string rootPath = Path.GetDirectoryName(AppDomain.CurrentDomain.BaseDirectory); |
489 | string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); | 489 | // string rootPathSE = Path.GetDirectoryName(GetType().Assembly.Location); |
490 | //Console.WriteLine("Assembly location: " + rootPath); | 490 | //Console.WriteLine("Assembly location: " + rootPath); |
491 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); | 491 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.dll")); |
492 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); | 492 | parameters.ReferencedAssemblies.Add(Path.Combine(rootPath, "OpenSim.Region.ScriptEngine.Shared.Api.Runtime.dll")); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs index 54b4861..69f9fdc 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/YP2CSConverter.cs | |||
@@ -69,11 +69,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
69 | YP.tell(myCS_SW); | 69 | YP.tell(myCS_SW); |
70 | 70 | ||
71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); | 71 | //Console.WriteLine("Mycode\n ===================================\n" + myCode+"\n"); |
72 | // disable warning on l1, don't see how we can | ||
73 | // code this differently | ||
74 | #pragma warning disable 0168 | ||
72 | foreach (bool l1 in Parser.parseInput(TermList)) | 75 | foreach (bool l1 in Parser.parseInput(TermList)) |
73 | { | 76 | { |
74 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) | 77 | foreach (bool l2 in YPCompiler.makeFunctionPseudoCode(TermList, FunctionCode)) |
75 | { | 78 | { |
76 | ListPair VFC = new ListPair(FunctionCode, new Variable()); | 79 | // ListPair VFC = new ListPair(FunctionCode, new Variable()); |
77 | //Console.WriteLine("-------------------------") | 80 | //Console.WriteLine("-------------------------") |
78 | //Console.WriteLine(FunctionCode.ToString()) | 81 | //Console.WriteLine(FunctionCode.ToString()) |
79 | //Console.WriteLine("-------------------------") | 82 | //Console.WriteLine("-------------------------") |
@@ -81,6 +84,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
81 | //YPCompiler.convertStringCodesCSharp(VFC); | 84 | //YPCompiler.convertStringCodesCSharp(VFC); |
82 | } | 85 | } |
83 | } | 86 | } |
87 | #pragma warning restore 0168 | ||
84 | YP.seen(); | 88 | YP.seen(); |
85 | myCS_SW.Close(); | 89 | myCS_SW.Close(); |
86 | YP.told(); | 90 | YP.told(); |