Attempt to speed up agent idle update by optimizing wearable/visualparam related lookups/iterations a bit more.
Generalized several templates in llstl.h in order to support more containers. Removed several instances of is_in_map/getWearableCount being followed immediately by another lookup with the same key. find is more efficient, as we get an iterator to use instead of a simple boolean.
This commit is contained in:
@@ -1063,13 +1063,14 @@ void LLInventoryModel::moveObject(const LLUUID& object_id, const LLUUID& cat_id)
|
||||
return;
|
||||
}
|
||||
|
||||
if((object_id == cat_id) || !is_in_map(mCategoryMap, cat_id))
|
||||
cat_map_t::iterator it;
|
||||
if((object_id == cat_id) || (it = mCategoryMap.find(cat_id))==mCategoryMap.end())
|
||||
{
|
||||
llwarns << "Could not move inventory object " << object_id << " to "
|
||||
<< cat_id << llendl;
|
||||
return;
|
||||
}
|
||||
LLViewerInventoryCategory* cat = getCategory(object_id);
|
||||
LLViewerInventoryCategory* cat = it->second;
|
||||
if(cat && (cat->getParentUUID() != cat_id))
|
||||
{
|
||||
cat_array_t* cat_array;
|
||||
|
||||
Reference in New Issue
Block a user