diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llagent.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llappearancemgr.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llappviewer.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llconversationlog.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llexternaleditor.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llinventoryfunctions.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lllogchat.cpp | 5 | ||||
-rw-r--r-- | indra/newview/llmarketplacenotifications.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llnotificationmanager.cpp | 21 | ||||
-rw-r--r-- | indra/newview/lloutfitgallery.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llpanelexperiencelisteditor.cpp | 3 | ||||
-rw-r--r-- | indra/newview/llpanelgroupbulkban.cpp | 13 | ||||
-rw-r--r-- | indra/newview/lltoolbarview.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llviewermessage.cpp | 6 |
16 files changed, 38 insertions, 64 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3853aaa8fd..1b765dfb83 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -95,7 +95,6 @@ #include "llworld.h" #include "llworldmap.h" #include "stringize.h" -#include "boost/foreach.hpp" #include "llcorehttputil.h" #include "lluiusage.h" @@ -2329,7 +2328,7 @@ void LLAgent::endAnimationUpdateUI() LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container"); LLFloaterIMContainer::floater_list_t conversations; im_box->getDetachedConversationFloaters(conversations); - BOOST_FOREACH(LLFloater* conversation, conversations) + for (LLFloater* conversation : conversations) { LL_INFOS() << "skip_list.insert(session_floater): " << conversation->getTitle() << LL_ENDL; skip_list.insert(conversation); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index ebf08eacd9..c84657cf7a 100644 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -27,7 +27,6 @@ #include "llviewerprecompiledheaders.h" #include <boost/lexical_cast.hpp> -#include <boost/foreach.hpp> #include "llaccordionctrltab.h" #include "llagent.h" #include "llagentcamera.h" @@ -1647,7 +1646,7 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id) sub_cat_array, outfit_item_array, LLInventoryModel::EXCLUDE_TRASH); - BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) + for (LLViewerInventoryItem* outfit_item : outfit_item_array) { LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); if (linked_item != NULL) @@ -3438,7 +3437,7 @@ void update_base_outfit_after_ordering() sub_cat_array, outfit_item_array, LLInventoryModel::EXCLUDE_TRASH); - BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) + for (LLViewerInventoryItem* outfit_item : outfit_item_array) { LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); if (linked_item != NULL) diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 4a43133ff6..b85ae408d4 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -143,7 +143,6 @@ // Third party library includes #include <boost/bind.hpp> -#include <boost/foreach.hpp> #include <boost/algorithm/string.hpp> #include <boost/regex.hpp> #include <boost/throw_exception.hpp> @@ -1207,7 +1206,7 @@ bool LLAppViewer::init() LLSD item(LeapCommand); LeapCommand.append(item); } - BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand)) + for (const std::string& leap : llsd::inArray(LeapCommand)) { LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL; // We don't have any better description of this plugin than the @@ -2357,7 +2356,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, LL_ERRS() << "Invalid settings location list" << LL_ENDL; } - BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) + for (const SettingsGroup& group : mSettingsLocationList->groups) { // skip settings groups that aren't the one we requested if (group.name() != location_key) continue; @@ -2369,7 +2368,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, return false; } - BOOST_FOREACH(const SettingsFile& file, group.files) + for (const SettingsFile& file : group.files) { LL_INFOS("Settings") << "Attempting to load settings for the group " << file.name() << " - from location " << location_key << LL_ENDL; @@ -2433,11 +2432,11 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key, std::string LLAppViewer::getSettingsFilename(const std::string& location_key, const std::string& file) { - BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups) + for (const SettingsGroup& group : mSettingsLocationList->groups) { if (group.name() == location_key) { - BOOST_FOREACH(const SettingsFile& settings_file, group.files) + for (const SettingsFile& settings_file : group.files) { if (settings_file.name() == file) { @@ -3017,7 +3016,7 @@ void LLAppViewer::initStrings() // Now that we've set "[sourceid]", have to go back through // default_trans_args and reinitialize all those other keys because some // of them, in turn, reference "[sourceid]". - BOOST_FOREACH(std::string key, default_trans_args) + for (const std::string& key : default_trans_args) { std::string brackets(key), nobrackets(key); // Invalid to inspect key[0] if key is empty(). But then, the entire diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp index e7ead90840..3c59ca046d 100644 --- a/indra/newview/llconversationlog.cpp +++ b/indra/newview/llconversationlog.cpp @@ -32,7 +32,6 @@ #include "llnotificationsutil.h" #include "lltrans.h" -#include <boost/foreach.hpp> #include "boost/lexical_cast.hpp" const S32Days CONVERSATION_LIFETIME = (S32Days)30; // lifetime of LLConversation is 30 days by spec @@ -392,7 +391,7 @@ void LLConversationLog::deleteBackupLogs() std::vector<std::string> backup_logs; getListOfBackupLogs(backup_logs); - BOOST_FOREACH(const std::string& fullpath, backup_logs) + for (const std::string& fullpath : backup_logs) { LLFile::remove(fullpath); } diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 9ec4fb085b..fa5248920d 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -37,8 +37,6 @@ #include "llimview.h" //For LLIMModel #include "lltrans.h" -#include <boost/foreach.hpp> - // // Conversation items : common behaviors // @@ -293,8 +291,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic // In the case of a P2P conversation, we need to grab the name of the other participant in the session instance itself // as we do not create participants for such a session. - LLFolderViewModelItem * itemp; - BOOST_FOREACH(itemp, mChildren) + for (auto itemp : mChildren) { LLConversationItem* current_participant = dynamic_cast<LLConversationItem*>(itemp); // Add the avatar uuid to the list (except if it's the own agent uuid) diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp index b66eb754a4..b0d88159c1 100644 --- a/indra/newview/llexternaleditor.cpp +++ b/indra/newview/llexternaleditor.cpp @@ -32,7 +32,6 @@ #include "llprocess.h" #include "llsdutil.h" #include "llstring.h" -#include <boost/foreach.hpp> // static const std::string LLExternalEditor::sFilenameMarker = "%s"; @@ -93,7 +92,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path) params.executable = mProcessParams.executable; // Substitute the filename marker in the command with the actual passed file name. - BOOST_FOREACH(const std::string& arg, mProcessParams.args) + for (const std::string& arg : mProcessParams.args) { std::string fixed(arg); LLStringUtil::replaceString(fixed, sFilenameMarker, file_path); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f997dc9910..92c54d2ffe 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -57,7 +57,6 @@ #include "llsdserialize.h" #include "llviewermenu.h" // is_agent_mappable #include "llviewerobjectlist.h" -#include "boost/foreach.hpp" const S32 EVENTS_PER_IDLE_LOOP_CURRENT_SESSION = 80; @@ -808,9 +807,9 @@ void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& float typedef conversations_widgets_map::value_type conv_pair; LLFloaterIMNearbyChat *nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); - BOOST_FOREACH(conv_pair item, mConversationsWidgets) + for (const auto& [key, fvi] : mConversationsWidgets) { - LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second); + LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(fvi); if (widget) { LLFloater* session_floater = widget->getSessionFloater(); diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 6ac8bbee76..eb979335f8 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -91,8 +91,6 @@ #include "llvoavatarself.h" #include "llwearablelist.h" -#include <boost/foreach.hpp> - BOOL LLInventoryState::sWearNewClothing = FALSE; LLUUID LLInventoryState::sWearNewClothingTransactionID; std::list<LLUUID> LLInventoryAction::sMarketplaceFolders; diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp index ca88f90ea9..55a947a09d 100644 --- a/indra/newview/lllogchat.cpp +++ b/indra/newview/lllogchat.cpp @@ -42,7 +42,6 @@ #include <boost/algorithm/string/trim.hpp> #include <boost/algorithm/string/replace.hpp> #include <boost/regex.hpp> -#include <boost/foreach.hpp> #if LL_MSVC #pragma warning(push) @@ -709,7 +708,7 @@ bool LLLogChat::moveTranscripts(const std::string originDirectory, std::string backupFileName; unsigned backupFileCount; - BOOST_FOREACH(const std::string& fullpath, listOfFilesToMove) + for (const std::string& fullpath : listOfFilesToMove) { backupFileCount = 0; newFullPath = targetDirectory + fullpath.substr(originDirectory.length(), std::string::npos); @@ -780,7 +779,7 @@ void LLLogChat::deleteTranscripts() getListOfTranscriptFiles(list_of_transcriptions); getListOfTranscriptBackupFiles(list_of_transcriptions); - BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions) + for (const std::string& fullpath : list_of_transcriptions) { S32 retry_count = 0; while (retry_count < 5) diff --git a/indra/newview/llmarketplacenotifications.cpp b/indra/newview/llmarketplacenotifications.cpp index 0886f9a990..02bd9e1f34 100644 --- a/indra/newview/llmarketplacenotifications.cpp +++ b/indra/newview/llmarketplacenotifications.cpp @@ -33,7 +33,6 @@ #include "llerror.h" -#include <boost/foreach.hpp> #include <boost/signals2.hpp> @@ -54,7 +53,7 @@ namespace LLMarketplaceInventoryNotifications llassert(!no_copy_payloads.empty()); llassert(no_copy_cb_action != NULL); - BOOST_FOREACH(const LLSD& payload, no_copy_payloads) + for (const LLSD& payload : no_copy_payloads) { (*no_copy_cb_action)(payload); } diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp index b06131cf38..3f6a86106a 100644 --- a/indra/newview/llnotificationmanager.cpp +++ b/indra/newview/llnotificationmanager.cpp @@ -34,9 +34,6 @@ #include "llfloaterimnearbychathandler.h" #include "llnotifications.h" -#include <boost/bind.hpp> -#include <boost/foreach.hpp> - using namespace LLNotificationsUI; //-------------------------------------------------------------------------- @@ -53,15 +50,15 @@ LLNotificationManager::~LLNotificationManager() //-------------------------------------------------------------------------- void LLNotificationManager::init() { - mChannels.push_back(new LLScriptHandler()); - mChannels.push_back(new LLTipHandler()); - mChannels.push_back(new LLGroupHandler()); - mChannels.push_back(new LLAlertHandler("Alerts", "alert", false)); - mChannels.push_back(new LLAlertHandler("AlertModal", "alertmodal", true)); - mChannels.push_back(new LLOfferHandler()); - mChannels.push_back(new LLHintHandler()); - mChannels.push_back(new LLBrowserNotification()); - mChannels.push_back(new LLIMHandler()); + mChannels.emplace_back(new LLScriptHandler()); + mChannels.emplace_back(new LLTipHandler()); + mChannels.emplace_back(new LLGroupHandler()); + mChannels.emplace_back(new LLAlertHandler("Alerts", "alert", false)); + mChannels.emplace_back(new LLAlertHandler("AlertModal", "alertmodal", true)); + mChannels.emplace_back(new LLOfferHandler()); + mChannels.emplace_back(new LLHintHandler()); + mChannels.emplace_back(new LLBrowserNotification()); + mChannels.emplace_back(new LLIMHandler()); mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler()); } diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp index de988555c5..432f18139c 100644 --- a/indra/newview/lloutfitgallery.cpp +++ b/indra/newview/lloutfitgallery.cpp @@ -28,8 +28,6 @@ #include "llviewerprecompiledheaders.h" // must be first include #include "lloutfitgallery.h" -#include <boost/foreach.hpp> - // llcommon #include "llcommonutils.h" #include "llfilesystem.h" @@ -1253,7 +1251,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id) sub_cat_array, outfit_item_array, LLInventoryModel::EXCLUDE_TRASH); - BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array) + for (LLViewerInventoryItem* outfit_item : outfit_item_array) { LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem(); LLUUID asset_id, inv_id; diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp index 0fdb9a57f3..854a32621a 100644 --- a/indra/newview/llpanelexperiencelisteditor.cpp +++ b/indra/newview/llpanelexperiencelisteditor.cpp @@ -40,7 +40,6 @@ #include "lltextbox.h" #include "lltrans.h" #include "llsdutil.h" -#include <boost/foreach.hpp> static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor"); @@ -96,7 +95,7 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids ) { mExperienceIds.clear(); - BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids)) + for (LLSD uuid : llsd::inArray(experience_ids)) { // Using insert(range) doesn't work here because the conversion from // LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry. diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp index cf1f0bc32f..2b6bf1bcd6 100644 --- a/indra/newview/llpanelgroupbulkban.cpp +++ b/indra/newview/llpanelgroupbulkban.cpp @@ -49,8 +49,6 @@ #include "lluictrlfactory.h" #include "llviewerwindow.h" -#include <boost/foreach.hpp> - LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupBulk(group_id) { // Pass on construction of this panel to the control factory. @@ -163,8 +161,8 @@ void LLPanelGroupBulkBan::submit() // remove already banned users and yourself from request. std::vector<LLAvatarName> banned_avatar_names; std::vector<LLAvatarName> out_of_limit_names; - bool banning_self = FALSE; - std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgent.getID()); + bool banning_self{ false }; + std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), gAgentID); if (conflict != banned_agent_list.end()) { banned_agent_list.erase(conflict); @@ -172,18 +170,17 @@ void LLPanelGroupBulkBan::submit() } if (group_datap) { - BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList) + for (const auto& [group_ban_agent_id, group_ban_data] : group_datap->mBanList) { - const LLUUID& group_ban_agent_id = group_ban_pair.first; std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id); if (conflict != banned_agent_list.end()) { LLAvatarName av_name; LLAvatarNameCache::get(group_ban_agent_id, &av_name); - banned_avatar_names.push_back(av_name); + banned_avatar_names.emplace_back(av_name); banned_agent_list.erase(conflict); - if (banned_agent_list.size() == 0) + if (banned_agent_list.empty()) { break; } diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp index f6628293ee..9157d20f98 100644 --- a/indra/newview/lltoolbarview.cpp +++ b/indra/newview/lltoolbarview.cpp @@ -46,8 +46,6 @@ #include "llviewercontrol.h" // HACK for destinations guide on startup #include "llinventorymodel.h" // HACK to disable starter avatars button for NUX -#include <boost/foreach.hpp> - LLToolBarView* gToolBarView = NULL; static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view"); @@ -282,7 +280,7 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode; mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->setButtonType(button_type); } - BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands) + for (const LLCommandId::Params& command_params : toolbar_set.left_toolbar.commands) { if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_LEFT])) { @@ -297,7 +295,7 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode; mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]->setButtonType(button_type); } - BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands) + for (const LLCommandId::Params& command_params : toolbar_set.right_toolbar.commands) { if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_RIGHT])) { @@ -312,7 +310,7 @@ bool LLToolBarView::loadToolbars(bool force_default) LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode; mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]->setButtonType(button_type); } - BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands) + for (const LLCommandId::Params& command_params : toolbar_set.bottom_toolbar.commands) { if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM])) { diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index ada898b98c..1dbb58a910 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -119,8 +119,6 @@ #include "llviewerregion.h" #include "llfloaterregionrestarting.h" -#include <boost/foreach.hpp> - #include "llnotificationmanager.h" // #include "llexperiencecache.h" @@ -5620,7 +5618,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp BOOL caution = FALSE; S32 count = 0; std::string perms; - BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS) + for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS) { if ((orig_questions & script_perm.permbit) && script_perm.caution) @@ -5864,7 +5862,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data) S32 known_questions = 0; bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit; // check the received permission flags against each permission - BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS) + for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS) { if (questions & script_perm.permbit) { |