immediately returning the string.Join operation instead of checking if the list has members

integration
SignpostMarv 2012-08-24 13:53:53 +01:00 committed by Melanie
parent d188272462
commit 582a256646
1 changed files with 5 additions and 11 deletions

View File

@ -5169,20 +5169,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
public LSL_String llList2CSV(LSL_List src) public LSL_String llList2CSV(LSL_List src)
{ {
string ret = String.Empty;
m_host.AddScriptLPS(1); m_host.AddScriptLPS(1);
if (src.Data.Length > 0) return string.Join(", ",
{ (new List<object>(src.Data)).ConvertAll<string>(o =>
ret = string.Join(", ", {
(new List<object>(src.Data)).ConvertAll<string>(o => return o.ToString();
{ }).ToArray());
return o.ToString();
}).ToArray());
}
return ret;
} }
/// <summary> /// <summary>