From d188272462f2c8d3e67aead26bb5b15ab243cdab Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 24 Aug 2012 13:52:30 +0100 Subject: refactoring using List.ConvertAll --- .../Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 0d275f7..a98fb04 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5170,17 +5170,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api { string ret = String.Empty; - int x = 0; m_host.AddScriptLPS(1); if (src.Data.Length > 0) { - ret = src.Data[x++].ToString(); - for (; x < src.Data.Length; x++) - { - ret += ", "+src.Data[x].ToString(); - } + ret = string.Join(", ", + (new List(src.Data)).ConvertAll(o => + { + return o.ToString(); + }).ToArray()); } return ret; -- cgit v1.1