From 064aade4c15d2cbc14fc9968ea4434d25b480be6 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 12 Sep 2015 17:20:07 +0100 Subject: [PATCH] remove a silly and not necessary List i added --- OpenSim/Data/Null/NullRegionData.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/OpenSim/Data/Null/NullRegionData.cs b/OpenSim/Data/Null/NullRegionData.cs index 3e6939439b..595db2f02a 100644 --- a/OpenSim/Data/Null/NullRegionData.cs +++ b/OpenSim/Data/Null/NullRegionData.cs @@ -134,7 +134,7 @@ namespace OpenSim.Data.Null if (m_useStaticInstance && Instance != this) return Instance.Get(posX, posY, scopeID); - List ret = new List(); + RegionData ret = null; lock (m_regionData) { @@ -142,14 +142,14 @@ namespace OpenSim.Data.Null { if (posX >= r.posX && posX < r.posX + r.sizeX && posY >= r.posY && posY < r.posY + r.sizeY) - ret.Add(r); + { + ret = r; + break; + } } } - if (ret.Count > 0) - return ret[0]; - - return null; + return ret; } public RegionData Get(UUID regionID, UUID scopeID)