diff options
author | Melanie Thielker | 2008-09-23 11:41:34 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-23 11:41:34 +0000 |
commit | 44e566260c9da5ff62c448cfdd67063c7a486126 (patch) | |
tree | 64b9c963872c986317132adc5d4fe0978ad25b64 /OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |
parent | Small fix to eliminate a beauty spot (diff) | |
download | opensim-SC_OLD-44e566260c9da5ff62c448cfdd67063c7a486126.zip opensim-SC_OLD-44e566260c9da5ff62c448cfdd67063c7a486126.tar.gz opensim-SC_OLD-44e566260c9da5ff62c448cfdd67063c7a486126.tar.bz2 opensim-SC_OLD-44e566260c9da5ff62c448cfdd67063c7a486126.tar.xz |
Mantis #2243
Thank you, tyre, for a patch that refactors LSL to use a unified set of
method signatures and type names, reorders methods and removes unused
and adds new method stubs.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index b8d72e0..5f64743 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -1238,12 +1238,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1238 | 1238 | ||
1239 | static public implicit operator String(key k) | 1239 | static public implicit operator String(key k) |
1240 | { | 1240 | { |
1241 | return k.value; | 1241 | return k.value; |
1242 | } | 1242 | } |
1243 | 1243 | ||
1244 | static public implicit operator LSLString(key k) | 1244 | static public implicit operator LSLString(key k) |
1245 | { | 1245 | { |
1246 | return k.value; | 1246 | return k.value; |
1247 | } | 1247 | } |
1248 | 1248 | ||
1249 | public static bool operator ==(key k1, key k2) | 1249 | public static bool operator ==(key k1, key k2) |
@@ -1449,11 +1449,13 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1449 | try | 1449 | try |
1450 | { | 1450 | { |
1451 | if (v.Contains("x") || v.Contains("X")) | 1451 | if (v.Contains("x") || v.Contains("X")) |
1452 | value = int.Parse(v.Substring(2), | 1452 | { |
1453 | System.Globalization.NumberStyles.HexNumber); | 1453 | value = int.Parse(v.Substring(2), System.Globalization.NumberStyles.HexNumber); |
1454 | } | ||
1454 | else | 1455 | else |
1455 | value = int.Parse(v, | 1456 | { |
1456 | System.Globalization.NumberStyles.Integer); | 1457 | value = int.Parse(v, System.Globalization.NumberStyles.Integer); |
1458 | } | ||
1457 | } | 1459 | } |
1458 | catch (OverflowException) | 1460 | catch (OverflowException) |
1459 | { | 1461 | { |
@@ -1669,12 +1671,12 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
1669 | 1671 | ||
1670 | static public explicit operator float(LSLFloat f) | 1672 | static public explicit operator float(LSLFloat f) |
1671 | { | 1673 | { |
1672 | return (float)f.value; | 1674 | return (float)f.value; |
1673 | } | 1675 | } |
1674 | 1676 | ||
1675 | static public explicit operator int(LSLFloat f) | 1677 | static public explicit operator int(LSLFloat f) |
1676 | { | 1678 | { |
1677 | return (int)f.value; | 1679 | return (int)f.value; |
1678 | } | 1680 | } |
1679 | 1681 | ||
1680 | static public explicit operator uint(LSLFloat f) | 1682 | static public explicit operator uint(LSLFloat f) |