diff options
author | Mike Mazur | 2008-07-24 05:23:42 +0000 |
---|---|---|
committer | Mike Mazur | 2008-07-24 05:23:42 +0000 |
commit | bb777a9c3c6824411b96bd6e14ff8d6325fbda38 (patch) | |
tree | 8b8e5f58290678827c3f13d58e723ec26e0c672b /OpenSim/Region/ScriptEngine/Shared/CodeTools | |
parent | Replace implicit casts from LSLFloat to int and uint which were removed in (diff) | |
download | opensim-SC_OLD-bb777a9c3c6824411b96bd6e14ff8d6325fbda38.zip opensim-SC_OLD-bb777a9c3c6824411b96bd6e14ff8d6325fbda38.tar.gz opensim-SC_OLD-bb777a9c3c6824411b96bd6e14ff8d6325fbda38.tar.bz2 opensim-SC_OLD-bb777a9c3c6824411b96bd6e14ff8d6325fbda38.tar.xz |
Replace the try/catch with a null check.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/CodeTools')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs index a7ca18c..a44b545 100644 --- a/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs +++ b/OpenSim/Region/ScriptEngine/Shared/CodeTools/LSL2CSCodeTransformer.cs | |||
@@ -34,7 +34,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
34 | public class LSL2CSCodeTransformer | 34 | public class LSL2CSCodeTransformer |
35 | { | 35 | { |
36 | private SYMBOL m_astRoot = null; | 36 | private SYMBOL m_astRoot = null; |
37 | private static Dictionary<string, string> m_datatypeLSL2OpenSim = new Dictionary<string, string>(); | 37 | private static Dictionary<string, string> m_datatypeLSL2OpenSim = null; |
38 | 38 | ||
39 | /// <summary> | 39 | /// <summary> |
40 | /// Pass the new CodeTranformer an abstract syntax tree. | 40 | /// Pass the new CodeTranformer an abstract syntax tree. |
@@ -45,8 +45,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
45 | m_astRoot = astRoot; | 45 | m_astRoot = astRoot; |
46 | 46 | ||
47 | // let's populate the dictionary | 47 | // let's populate the dictionary |
48 | try | 48 | if (null == m_datatypeLSL2OpenSim) |
49 | { | 49 | { |
50 | m_datatypeLSL2OpenSim = new Dictionary<string, string>(); | ||
50 | m_datatypeLSL2OpenSim.Add("integer", "LSL_Types.LSLInteger"); | 51 | m_datatypeLSL2OpenSim.Add("integer", "LSL_Types.LSLInteger"); |
51 | m_datatypeLSL2OpenSim.Add("float", "LSL_Types.LSLFloat"); | 52 | m_datatypeLSL2OpenSim.Add("float", "LSL_Types.LSLFloat"); |
52 | //m_datatypeLSL2OpenSim.Add("key", "LSL_Types.key"); // key doesn't seem to be used | 53 | //m_datatypeLSL2OpenSim.Add("key", "LSL_Types.key"); // key doesn't seem to be used |
@@ -56,10 +57,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.CodeTools | |||
56 | m_datatypeLSL2OpenSim.Add("rotation", "LSL_Types.Quaternion"); | 57 | m_datatypeLSL2OpenSim.Add("rotation", "LSL_Types.Quaternion"); |
57 | m_datatypeLSL2OpenSim.Add("list", "LSL_Types.list"); | 58 | m_datatypeLSL2OpenSim.Add("list", "LSL_Types.list"); |
58 | } | 59 | } |
59 | catch | ||
60 | { | ||
61 | // temporary workaround since we are adding to a static datatype | ||
62 | } | ||
63 | } | 60 | } |
64 | 61 | ||
65 | /// <summary> | 62 | /// <summary> |