From 3d8f393fbe0072d93fc8303741420bb36c844d44 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 efd1f396d5..43cfea229a 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs @@ -2257,11 +2257,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; }