Remove the null checks altogether

avinationmerge
Melanie Thielker 2010-07-20 00:55:31 +02:00
parent 54da64acac
commit 191bee2ed0
2 changed files with 5 additions and 20 deletions

View File

@ -5027,14 +5027,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
{ {
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (src == null) return src.Length;
{
return 0;
}
else
{
return src.Length;
}
} }
public LSL_Integer llList2Integer(LSL_List src, int index) public LSL_Integer llList2Integer(LSL_List src, int index)

View File

@ -613,24 +613,16 @@ namespace OpenSim.Region.ScriptEngine.Shared
public static bool operator ==(list a, list b) public static bool operator ==(list a, list b)
{ {
int la = -1; int la = a.Length;
int lb = -1; int lb = b.Length;
if (a != null)
la = a.Length;
if (b != null)
lb = b.Length;
return la == lb; return la == lb;
} }
public static bool operator !=(list a, list b) public static bool operator !=(list a, list b)
{ {
int la = -1; int la = a.Length;
int lb = -1; int lb = b.Length;
if (a != null)
la = a.Length;
if (b != null)
lb = b.Length;
return la != lb; return la != lb;
} }