refactoring instantiation of Location object: moving it out of the for

loop as it really is a "constant"
0.6.6-post-fixes
Dr Scofield 2009-05-20 13:37:25 +00:00
parent 20383a61b8
commit 4c7da1421f
1 changed files with 2 additions and 1 deletions

View File

@ -604,10 +604,11 @@ namespace OpenSim
// Shutting down the client server
bool foundClientServer = false;
int clientServerElement = 0;
Location location = new Location(whichRegion.RegionHandle);
for (int i = 0; i < m_clientServers.Count; i++)
{
if (m_clientServers[i].HandlesRegion(new Location(whichRegion.RegionHandle)))
if (m_clientServers[i].HandlesRegion(location))
{
clientServerElement = i;
foundClientServer = true;