From 28aa37d8aa437697f8969b471188f90a26826133 Mon Sep 17 00:00:00 2001 From: Rye Mutt <rye@alchemyviewer.org> Date: Thu, 10 Sep 2020 04:59:56 -0400 Subject: [PATCH] Yearly removal of BOOST_FOREACH that snuck back in --- indra/llcommon/llsingleton.cpp | 1 - indra/llui/lllayoutstack.cpp | 7 ++++--- indra/llvfs/tests/lldir_test.cpp | 5 ++--- indra/newview/llconversationmodel.cpp | 5 +---- indra/newview/llexternaleditor.cpp | 1 - 5 files changed, 7 insertions(+), 12 deletions(-) diff --git a/indra/llcommon/llsingleton.cpp b/indra/llcommon/llsingleton.cpp index 7493ba64238..903b3bca00e 100644 --- a/indra/llcommon/llsingleton.cpp +++ b/indra/llcommon/llsingleton.cpp @@ -32,7 +32,6 @@ #include "lldependencies.h" #include "llexception.h" #include "llcoros.h" -#include <boost/foreach.hpp> #include <algorithm> #include <iostream> // std::cerr in dire emergency #include <sstream> diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp index c09ad2e3b39..b238e0a3ceb 100644 --- a/indra/llui/lllayoutstack.cpp +++ b/indra/llui/lllayoutstack.cpp @@ -34,7 +34,8 @@ #include "llpanel.h" #include "llcriticaldamp.h" #include "lliconctrl.h" -#include "boost/foreach.hpp" + +#include <boost/range/adaptor/reversed.hpp> static const F32 MIN_FRACTIONAL_SIZE = 0.00001f; static const F32 MAX_FRACTIONAL_SIZE = 1.f; @@ -813,7 +814,7 @@ void LLLayoutStack::updatePanelRect( LLLayoutPanel* resized_panel, const LLRect& LLLayoutPanel* other_resize_panel = NULL; LLLayoutPanel* following_panel = NULL; - BOOST_REVERSE_FOREACH(LLLayoutPanel* panelp, mPanels) + for (LLLayoutPanel* panelp : boost::adaptors::reverse(mPanels)) { if (panelp->mAutoResize) { @@ -970,7 +971,7 @@ void LLLayoutStack::reshape(S32 width, S32 height, BOOL called_from_parent) void LLLayoutStack::updateResizeBarLimits() { LLLayoutPanel* previous_visible_panelp = NULL; - BOOST_REVERSE_FOREACH(LLLayoutPanel* visible_panelp, mPanels) + for (LLLayoutPanel* visible_panelp : boost::adaptors::reverse(mPanels)) { if (!visible_panelp->getVisible() || visible_panelp->mCollapsed) { diff --git a/indra/llvfs/tests/lldir_test.cpp b/indra/llvfs/tests/lldir_test.cpp index 6cc4f741145..13dedd6b5a1 100644 --- a/indra/llvfs/tests/lldir_test.cpp +++ b/indra/llvfs/tests/lldir_test.cpp @@ -34,7 +34,6 @@ #include "../test/lltut.h" #include "stringize.h" -#include <boost/foreach.hpp> #include <boost/assign/list_of.hpp> using boost::assign::list_of; @@ -109,7 +108,7 @@ struct LLDir_Dummy: public LLDir "install/skins/default/future/somefile.txt" }; - BOOST_FOREACH(const char* path, preload) + for(const char* path : preload) { buildFilesystem(path); } @@ -166,7 +165,7 @@ struct LLDir_Dummy: public LLDir LLStringUtil::getTokens(path, components, "/"); // Ensure we have an entry representing every level of this path std::string partial; - BOOST_FOREACH(std::string component, components) + for (std::string component : components) { append(partial, component); mFilesystem.insert(partial); diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index b94c2780edd..c0f10b4f5f7 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 // @@ -284,8 +282,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(LLFolderViewModelItem* 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 78884082929..b0d88159c15 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"; -- GitLab