From 5203665bb2d68c6a4e0ea3180334b607db6ab1ce Mon Sep 17 00:00:00 2001 From: SignpostMarv Date: Fri, 24 Aug 2012 17:25:37 +0100 Subject: [PATCH] refactoring to local variable for cleaner code --- .../ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index a391b73bf9..927f37c6f2 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2246,11 +2246,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api CheckThreatLevel(ThreatLevel.High, "osGetLinkPrimitiveParams"); m_host.AddScriptLPS(1); InitLSL(); + // One needs to cast m_LSL_Api because we're using functions not + // on the ILSL_Api interface. + LSL_Api LSL_Api = (LSL_Api)m_LSL_Api; LSL_List retVal = new LSL_List(); - List parts = ((LSL_Api)m_LSL_Api).GetLinkParts(linknumber); + List parts = LSL_Api.GetLinkParts(linknumber); foreach (SceneObjectPart part in parts) { - ((LSL_Api)m_LSL_Api).GetPrimParams(part, rules, ref retVal); + LSL_Api.GetPrimParams(part, rules, ref retVal); } return retVal; }