diff options
author | Melanie Thielker | 2010-07-20 00:55:31 +0200 |
---|---|---|
committer | Melanie Thielker | 2010-07-20 00:55:31 +0200 |
commit | 191bee2ed0903b23f5d93f79650daf7662480b17 (patch) | |
tree | 15e4e619158032bb29376e3dc0f64e70ad208097 | |
parent | Remove exception badness in the LSL Types. Who ever came up with that.....?! (diff) | |
download | opensim-SC_OLD-191bee2ed0903b23f5d93f79650daf7662480b17.zip opensim-SC_OLD-191bee2ed0903b23f5d93f79650daf7662480b17.tar.gz opensim-SC_OLD-191bee2ed0903b23f5d93f79650daf7662480b17.tar.bz2 opensim-SC_OLD-191bee2ed0903b23f5d93f79650daf7662480b17.tar.xz |
Remove the null checks altogether
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | 16 |
2 files changed, 5 insertions, 20 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index a947b3d..138bcc9 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5027,14 +5027,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5027 | { | 5027 | { |
5028 | m_host.AddScriptLPS(1); | 5028 | m_host.AddScriptLPS(1); |
5029 | 5029 | ||
5030 | if (src == null) | 5030 | return src.Length; |
5031 | { | ||
5032 | return 0; | ||
5033 | } | ||
5034 | else | ||
5035 | { | ||
5036 | return src.Length; | ||
5037 | } | ||
5038 | } | 5031 | } |
5039 | 5032 | ||
5040 | public LSL_Integer llList2Integer(LSL_List src, int index) | 5033 | public LSL_Integer llList2Integer(LSL_List src, int index) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs index bab5156..a3a2fdf 100644 --- a/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs +++ b/OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs | |||
@@ -613,24 +613,16 @@ namespace OpenSim.Region.ScriptEngine.Shared | |||
613 | 613 | ||
614 | public static bool operator ==(list a, list b) | 614 | public static bool operator ==(list a, list b) |
615 | { | 615 | { |
616 | int la = -1; | 616 | int la = a.Length; |
617 | int lb = -1; | 617 | int lb = b.Length; |
618 | if (a != null) | ||
619 | la = a.Length; | ||
620 | if (b != null) | ||
621 | lb = b.Length; | ||
622 | 618 | ||
623 | return la == lb; | 619 | return la == lb; |
624 | } | 620 | } |
625 | 621 | ||
626 | public static bool operator !=(list a, list b) | 622 | public static bool operator !=(list a, list b) |
627 | { | 623 | { |
628 | int la = -1; | 624 | int la = a.Length; |
629 | int lb = -1; | 625 | int lb = b.Length; |
630 | if (a != null) | ||
631 | la = a.Length; | ||
632 | if (b != null) | ||
633 | lb = b.Length; | ||
634 | 626 | ||
635 | return la != lb; | 627 | return la != lb; |
636 | } | 628 | } |