From 2602d4f16e7668ce1747b91c4a12e94b74cc605b Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 24 Aug 2012 13:52:30 +0100 Subject: [PATCH] refactoring using List.ConvertAll --- .../ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 5efcc10517..f815a11dfa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs @@ -5132,17 +5132,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;