summaryrefslogtreecommitdiff
path: root/indra/newview/llfriendcard.cpp
diff options
context:
space:
mode:
authorsimon <none@none>2014-05-07 10:56:41 -0700
committersimon <none@none>2014-05-07 10:56:41 -0700
commit250db74bf9325acdc1169f6c13d297e7fe44b753 (patch)
treec6926efeefeb10ec3a36b296aa1ac7bd8521e0e3 /indra/newview/llfriendcard.cpp
parent676bad148a72c235ec79742e3f490ca66b4f40d0 (diff)
parentd0ef02c23a7a37c8c9bfe3a86bae88bb811fc9fe (diff)
Pull and merge viewer-release as version 3.7.8
Diffstat (limited to 'indra/newview/llfriendcard.cpp')
-rwxr-xr-xindra/newview/llfriendcard.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index 16ed3f990c..6566ef5dca 100755
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -67,10 +67,10 @@ inline const std::string get_friend_all_subfolder_name()
void move_from_to_arrays(LLInventoryModel::cat_array_t& from, LLInventoryModel::cat_array_t& to)
{
- while (from.count() > 0)
+ while (from.size() > 0)
{
- to.put(from.get(0));
- from.remove(0);
+ to.push_back(from.at(0));
+ from.erase(from.begin());
}
}
@@ -82,7 +82,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
gInventory.collectDescendentsIf(parentFolderUUID, cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
- S32 cats_count = cats.count();
+ S32 cats_count = cats.size();
if (cats_count > 1)
{
@@ -92,7 +92,7 @@ const LLUUID& get_folder_uuid(const LLUUID& parentFolderUUID, LLInventoryCollect
<< LL_ENDL;
}
- return (cats_count >= 1) ? cats.get(0)->getUUID() : LLUUID::null;
+ return (cats_count >= 1) ? cats.at(0)->getUUID() : LLUUID::null;
}
/**
@@ -172,14 +172,14 @@ LLFriendCardsManager::~LLFriendCardsManager()
void LLFriendCardsManager::putAvatarData(const LLUUID& avatarID)
{
- llinfos << "Store avatar data, avatarID: " << avatarID << llendl;
+ LL_INFOS() << "Store avatar data, avatarID: " << avatarID << LL_ENDL;
std::pair< avatar_uuid_set_t::iterator, bool > pr;
pr = mBuddyIDSet.insert(avatarID);
if (pr.second == false)
{
- llwarns << "Trying to add avatar UUID for the stored avatar: "
+ LL_WARNS() << "Trying to add avatar UUID for the stored avatar: "
<< avatarID
- << llendl;
+ << LL_ENDL;
}
}
@@ -189,7 +189,7 @@ const LLUUID LLFriendCardsManager::extractAvatarID(const LLUUID& avatarID)
avatar_uuid_set_t::iterator it = mBuddyIDSet.find(avatarID);
if (mBuddyIDSet.end() == it)
{
- llwarns << "Call method for non-existent avatar name in the map: " << avatarID << llendl;
+ LL_WARNS() << "Call method for non-existent avatar name in the map: " << avatarID << LL_ENDL;
}
else
{
@@ -207,7 +207,7 @@ bool LLFriendCardsManager::isItemInAnyFriendsList(const LLViewerInventoryItem* i
LLInventoryModel::item_array_t items;
findMatchedFriendCards(item->getCreatorUUID(), items);
- return items.count() > 0;
+ return items.size() > 0;
}
@@ -242,9 +242,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
{
LLUUID creator_id = item->getCreatorUUID();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( creator_id == cur_item->getCreatorUUID() )
{
result = true;
@@ -259,9 +259,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryItem* cur_item = NULL;
- for ( S32 i = items->count() - 1; i >= 0; --i )
+ for ( S32 i = items->size() - 1; i >= 0; --i )
{
- cur_item = items->get(i);
+ cur_item = items->at(i);
if ( obj->getType() != cur_item->getType() )
continue;
if ( obj_name == cur_item->getName() )
@@ -279,9 +279,9 @@ bool LLFriendCardsManager::isObjDirectDescendentOfCategory(const LLInventoryObje
// then return true. Note: UUID's of compared items also may be not equal.
std::string obj_name = obj->getName();
LLViewerInventoryCategory* cur_cat = NULL;
- for ( S32 i = cats->count() - 1; i >= 0; --i )
+ for ( S32 i = cats->size() - 1; i >= 0; --i )
{
- cur_cat = cats->get(i);
+ cur_cat = cats->at(i);
if ( obj->getType() != cur_cat->getType() )
continue;
if ( obj_name == cur_cat->getName() )
@@ -381,10 +381,10 @@ void LLFriendCardsManager::findMatchedFriendCards(const LLUUID& avatarID, LLInve
LLInventoryModel::cat_array_t subFolders;
subFolders.push_back(friendFolder);
- while (subFolders.count() > 0)
+ while (subFolders.size() > 0)
{
- LLViewerInventoryCategory* cat = subFolders.get(0);
- subFolders.remove(0);
+ LLViewerInventoryCategory* cat = subFolders.at(0);
+ subFolders.erase(subFolders.begin());
gInventory.collectDescendentsIf(cat->getUUID(), cats, items,
LLInventoryModel::EXCLUDE_TRASH, matchFunctor);
@@ -431,7 +431,7 @@ void LLFriendCardsManager::ensureFriendsFolderExists()
{
LLViewerInventoryCategory* cat = gInventory.getCategory(calling_cards_folder_ID);
std::string cat_name = cat ? cat->getName() : "unknown";
- llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl;
+ LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
friends_folder_ID = gInventory.createNewCategory(calling_cards_folder_ID,
@@ -462,7 +462,7 @@ void LLFriendCardsManager::ensureFriendsAllFolderExists()
{
LLViewerInventoryCategory* cat = gInventory.getCategory(friends_folder_ID);
std::string cat_name = cat ? cat->getName() : "unknown";
- llwarns << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << llendl;
+ LL_WARNS() << "Failed to find \"" << cat_name << "\" category descendents in Category Tree." << LL_ENDL;
}
friends_all_folder_ID = gInventory.createNewCategory(friends_folder_ID,
@@ -507,7 +507,7 @@ void LLFriendCardsManager::syncFriendsFolder()
// 2. Add missing Friend Cards for friends
LLAvatarTracker::buddy_map_t::const_iterator buddy_it = all_buddies.begin();
- llinfos << "try to build friends, count: " << all_buddies.size() << llendl;
+ LL_INFOS() << "try to build friends, count: " << all_buddies.size() << LL_ENDL;
for(; buddy_it != all_buddies.end(); ++buddy_it)
{
const LLUUID& buddy_id = (*buddy_it).first;
@@ -535,26 +535,26 @@ void LLFriendCardsManager::addFriendCardToInventory(const LLUUID& avatarID)
LLAvatarNameCache::get(avatarID, &av_name);
const std::string& name = av_name.getAccountName();
- lldebugs << "Processing buddy name: " << name
+ LL_DEBUGS() << "Processing buddy name: " << name
<< ", id: " << avatarID
- << llendl;
+ << LL_ENDL;
if (shouldBeAdded && findFriendCardInventoryUUIDImpl(avatarID).notNull())
{
shouldBeAdded = false;
- lldebugs << "is found in Inventory: " << name << llendl;
+ LL_DEBUGS() << "is found in Inventory: " << name << LL_ENDL;
}
if (shouldBeAdded && isAvatarDataStored(avatarID))
{
shouldBeAdded = false;
- lldebugs << "is found in sentRequests: " << name << llendl;
+ LL_DEBUGS() << "is found in sentRequests: " << name << LL_ENDL;
}
if (shouldBeAdded)
{
putAvatarData(avatarID);
- lldebugs << "Sent create_inventory_item for " << avatarID << ", " << name << llendl;
+ LL_DEBUGS() << "Sent create_inventory_item for " << avatarID << ", " << name << LL_ENDL;
// TODO: mantipov: Is CreateFriendCardCallback really needed? Probably not
LLPointer<LLInventoryCallback> cb = new CreateFriendCardCallback;