From a2e22732f195dc075a733c79f15156752f522a43 Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Tue, 30 Jul 2013 19:13:45 -0700 Subject: Summer cleaning - removed a lot of llcommon dependencies to speed up build times consolidated most indra-specific constants in llcommon under indra_constants.h fixed issues with operations on mixed unit types (implicit and explicit) made LL_INFOS() style macros variadic in order to subsume other logging methods such as ll_infos added optional tag output to error recorders --- indra/newview/llfavoritesbar.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'indra/newview/llfavoritesbar.cpp') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index 6d90667194..fc531a0c74 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -727,7 +727,7 @@ void LLFavoritesBarCtrl::updateButtons() int first_changed_item_index = 0; int rightest_point = getRect().mRight - mMoreTextBox->getRect().getWidth(); //lets find first changed button - while (child_it != childs->end() && first_changed_item_index < mItems.count()) + while (child_it != childs->end() && first_changed_item_index < mItems.size()) { LLFavoriteLandmarkButton* button = dynamic_cast (*child_it); if (button) @@ -749,7 +749,7 @@ void LLFavoritesBarCtrl::updateButtons() } // now first_changed_item_index should contains a number of button that need to change - if (first_changed_item_index <= mItems.count()) + if (first_changed_item_index <= mItems.size()) { // Rebuild the buttons only // child_list_t is a linked list, so safe to erase from the middle if we pre-increment the iterator @@ -787,7 +787,7 @@ void LLFavoritesBarCtrl::updateButtons() //last_right_edge is saving coordinates LLButton* last_new_button = NULL; int j = first_changed_item_index; - for (; j < mItems.count(); j++) + for (; j < mItems.size(); j++) { last_new_button = createButton(mItems[j], button_params, last_right_edge); if (!last_new_button) @@ -801,7 +801,7 @@ void LLFavoritesBarCtrl::updateButtons() } mFirstDropDownItem = j; // Chevron button - if (mFirstDropDownItem < mItems.count()) + if (mFirstDropDownItem < mItems.size()) { // if updateButton had been called it means: //or there are some new favorites, or width had been changed @@ -963,9 +963,9 @@ void LLFavoritesBarCtrl::updateMenuItems(LLToggleableMenu* menu) U32 widest_item = 0; - for (S32 i = mFirstDropDownItem; i < mItems.count(); i++) + for (S32 i = mFirstDropDownItem; i < mItems.size(); i++) { - LLViewerInventoryItem* item = mItems.get(i); + LLViewerInventoryItem* item = mItems.at(i); const std::string& item_name = item->getName(); LLFavoriteLandmarkMenuItem::Params item_params; @@ -1221,12 +1221,12 @@ BOOL LLFavoritesBarCtrl::isClipboardPasteable() const return FALSE; } - LLDynamicArray objects; + std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); - S32 count = objects.count(); + S32 count = objects.size(); for(S32 i = 0; i < count; i++) { - const LLUUID &item_id = objects.get(i); + const LLUUID &item_id = objects.at(i); // Can't paste folders const LLInventoryCategory *cat = gInventory.getCategory(item_id); @@ -1250,13 +1250,13 @@ void LLFavoritesBarCtrl::pasteFromClipboard() const if(model && isClipboardPasteable()) { LLInventoryItem* item = NULL; - LLDynamicArray objects; + std::vector objects; LLClipboard::instance().pasteFromClipboard(objects); - S32 count = objects.count(); + S32 count = objects.size(); LLUUID parent_id(mFavoriteFolderId); for(S32 i = 0; i < count; i++) { - item = model->getItem(objects.get(i)); + item = model->getItem(objects.at(i)); if (item) { copy_inventory_item( -- cgit v1.2.3 From e340009fc59d59e59b2e8d903a884acb76b178eb Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Fri, 9 Aug 2013 17:11:19 -0700 Subject: second phase summer cleaning replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc. --- indra/newview/llfavoritesbar.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'indra/newview/llfavoritesbar.cpp') diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index fc531a0c74..3c47545121 100755 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -478,7 +478,7 @@ BOOL LLFavoritesBarCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, const LLUUID favorites_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_FAVORITE); if (item->getParentUUID() == favorites_id) { - llwarns << "Attemt to copy a favorite item into the same folder." << llendl; + LL_WARNS() << "Attemt to copy a favorite item into the same folder." << LL_ENDL; break; } @@ -621,7 +621,7 @@ void LLFavoritesBarCtrl::handleNewFavoriteDragAndDrop(LLInventoryItem *item, con cb); } - llinfos << "Copied inventory item #" << item->getUUID() << " to favorites." << llendl; + LL_INFOS() << "Copied inventory item #" << item->getUUID() << " to favorites." << LL_ENDL; } //virtual @@ -858,7 +858,7 @@ LLButton* LLFavoritesBarCtrl::createButton(const LLPointer(fav_btn_params); if (NULL == fav_btn) { - llwarns << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << llendl; + LL_WARNS() << "Unable to create LLFavoriteLandmarkButton widget: " << item->getName() << LL_ENDL; return NULL; } @@ -1146,7 +1146,7 @@ bool LLFavoritesBarCtrl::enableSelected(const LLSD& userdata) void LLFavoritesBarCtrl::doToSelected(const LLSD& userdata) { std::string action = userdata.asString(); - llinfos << "Action = " << action << " Item = " << mSelectedItemID.asString() << llendl; + LL_INFOS() << "Action = " << action << " Item = " << mSelectedItemID.asString() << LL_ENDL; LLViewerInventoryItem* item = gInventory.getItem(mSelectedItemID); if (!item) @@ -1473,14 +1473,14 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() // Do not change the file if we are not logged in yet. if (!LLLoginInstance::getInstance()->authSuccess()) { - llwarns << "Cannot save favorites: not logged in" << llendl; + LL_WARNS() << "Cannot save favorites: not logged in" << LL_ENDL; return; } std::string user_dir = gDirUtilp->getExpandedFilename(LL_PATH_USER_SETTINGS, ""); if (user_dir.empty()) { - llwarns << "Cannot save favorites: empty user dir name" << llendl; + LL_WARNS() << "Cannot save favorites: empty user dir name" << LL_ENDL; return; } @@ -1508,13 +1508,13 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() slurls_map_t::iterator slurl_iter = mSLURLs.find(value["asset_id"]); if (slurl_iter != mSLURLs.end()) { - lldebugs << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << llendl; + LL_DEBUGS() << "Saving favorite: idx=" << LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID()) << ", SLURL=" << slurl_iter->second << ", value=" << value << LL_ENDL; value["slurl"] = slurl_iter->second; user_llsd[LLFavoritesOrderStorage::instance().getSortIndex((*it)->getUUID())] = value; } else { - llwarns << "Not saving favorite " << value["name"] << ": no matching SLURL" << llendl; + LL_WARNS() << "Not saving favorite " << value["name"] << ": no matching SLURL" << LL_ENDL; } } @@ -1522,7 +1522,7 @@ void LLFavoritesOrderStorage::saveFavoritesSLURLs() LLAvatarNameCache::get( gAgentID, &av_name ); // Note : use the "John Doe" and not the "john.doe" version of the name // as we'll compare it with the stored credentials in the login panel. - lldebugs << "Saved favorites for " << av_name.getUserName() << llendl; + LL_DEBUGS() << "Saved favorites for " << av_name.getUserName() << LL_ENDL; fav_llsd[av_name.getUserName()] = user_llsd; llofstream file; @@ -1543,7 +1543,7 @@ void LLFavoritesOrderStorage::removeFavoritesRecordOfUser() LLAvatarNameCache::get( gAgentID, &av_name ); // Note : use the "John Doe" and not the "john.doe" version of the name. // See saveFavoritesSLURLs() here above for the reason why. - lldebugs << "Removed favorites for " << av_name.getUserName() << llendl; + LL_DEBUGS() << "Removed favorites for " << av_name.getUserName() << LL_ENDL; if (fav_llsd.has(av_name.getUserName())) { fav_llsd.erase(av_name.getUserName()); @@ -1576,7 +1576,7 @@ void LLFavoritesOrderStorage::onLandmarkLoaded(const LLUUID& asset_id, LLLandmar void LLFavoritesOrderStorage::storeFavoriteSLURL(const LLUUID& asset_id, std::string& slurl) { - lldebugs << "Saving landmark SLURL: " << slurl << llendl; + LL_DEBUGS() << "Saving landmark SLURL: " << slurl << LL_ENDL; mSLURLs[asset_id] = slurl; } -- cgit v1.2.3