aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation
diff options
context:
space:
mode:
authorSignpostMarv2012-08-24 13:53:53 +0100
committerMelanie2012-08-24 17:44:14 +0100
commit582a256646d1093b2c8889d89dbaa88f1c5fc81d (patch)
treea3351124ffe73a70e90c6080b2b175732bb357be /OpenSim/Region/ScriptEngine/Shared/Api/Implementation
parentrefactoring using List.ConvertAll<string> (diff)
downloadopensim-SC-582a256646d1093b2c8889d89dbaa88f1c5fc81d.zip
opensim-SC-582a256646d1093b2c8889d89dbaa88f1c5fc81d.tar.gz
opensim-SC-582a256646d1093b2c8889d89dbaa88f1c5fc81d.tar.bz2
opensim-SC-582a256646d1093b2c8889d89dbaa88f1c5fc81d.tar.xz
immediately returning the string.Join operation instead of checking if the list has members
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs16
1 files changed, 5 insertions, 11 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
index a98fb04..bbbc6cc 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
@@ -5169,20 +5169,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
5169 public LSL_String llList2CSV(LSL_List src) 5169 public LSL_String llList2CSV(LSL_List src)
5170 { 5170 {
5171 5171
5172 string ret = String.Empty;
5173 5172
5174 m_host.AddScriptLPS(1); 5173 m_host.AddScriptLPS(1);
5175 5174
5176 if (src.Data.Length > 0) 5175 return string.Join(", ",
5177 { 5176 (new List<object>(src.Data)).ConvertAll<string>(o =>
5178 ret = string.Join(", ", 5177 {
5179 (new List<object>(src.Data)).ConvertAll<string>(o => 5178 return o.ToString();
5180 { 5179 }).ToArray());
5181 return o.ToString();
5182 }).ToArray());
5183 }
5184
5185 return ret;
5186 } 5180 }
5187 5181
5188 /// <summary> 5182 /// <summary>