mirror of
https://github.com/opensim/opensim.git
synced 2026-07-21 15:35:41 +08:00
Remove the null checks altogether
This commit is contained in:
@@ -5027,14 +5027,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
if (src == null)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return src.Length;
|
||||
}
|
||||
return src.Length;
|
||||
}
|
||||
|
||||
public LSL_Integer llList2Integer(LSL_List src, int index)
|
||||
|
||||
@@ -613,24 +613,16 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
|
||||
public static bool operator ==(list a, list b)
|
||||
{
|
||||
int la = -1;
|
||||
int lb = -1;
|
||||
if (a != null)
|
||||
la = a.Length;
|
||||
if (b != null)
|
||||
lb = b.Length;
|
||||
int la = a.Length;
|
||||
int lb = b.Length;
|
||||
|
||||
return la == lb;
|
||||
}
|
||||
|
||||
public static bool operator !=(list a, list b)
|
||||
{
|
||||
int la = -1;
|
||||
int lb = -1;
|
||||
if (a != null)
|
||||
la = a.Length;
|
||||
if (b != null)
|
||||
lb = b.Length;
|
||||
int la = a.Length;
|
||||
int lb = b.Length;
|
||||
|
||||
return la != lb;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user