Cache the lookup of the sim access level.
Being part of the state line, it is called every frame, causing a translation lookup every frame.
This commit is contained in:
@@ -599,9 +599,15 @@ BOOL LLViewerRegion::canManageEstate() const
|
||||
|| gAgent.getID() == getOwner();
|
||||
}
|
||||
|
||||
const std::string LLViewerRegion::getSimAccessString() const
|
||||
std::string const& LLViewerRegion::getSimAccessString()
|
||||
{
|
||||
return accessToString(mSimAccess);
|
||||
// Singu: added a cache because this is called every frame.
|
||||
if (mLastSimAccess != mSimAccess)
|
||||
{
|
||||
mSimAccessString = accessToString(mSimAccess);
|
||||
mLastSimAccess = mSimAccess;
|
||||
}
|
||||
return mSimAccessString;
|
||||
}
|
||||
|
||||
std::string LLViewerRegion::getLocalizedSimProductName() const
|
||||
|
||||
Reference in New Issue
Block a user