Don't convert UUID -> ToString for every friend (Minor optimisation based on profiler feedback)

avinationmerge
Tom Grimshaw 2010-05-12 07:14:06 -07:00
parent 40e05f4109
commit 98bd3e1f34
1 changed files with 2 additions and 1 deletions

View File

@ -201,9 +201,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Friends
UserFriendData data = m_Friends[principalID]; UserFriendData data = m_Friends[principalID];
string searchFor = friendID.ToString();
foreach (FriendInfo fi in data.Friends) foreach (FriendInfo fi in data.Friends)
{ {
if (fi.Friend == friendID.ToString()) if (fi.Friend == searchFor)
return (uint)fi.TheirFlags; return (uint)fi.TheirFlags;
} }
return 0; return 0;