diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/llinventory/llparcel.cpp | 2 | ||||
| -rw-r--r-- | indra/llui/lldockablefloater.h | 3 | ||||
| -rw-r--r-- | indra/newview/llappearancemgr.h | 3 | ||||
| -rw-r--r-- | indra/newview/llfavoritesbar.cpp | 7 | ||||
| -rw-r--r-- | indra/newview/llfloater360capture.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llfloaterregioninfo.cpp | 12 | ||||
| -rw-r--r-- | indra/newview/lltoast.h | 3 | ||||
| -rw-r--r-- | indra/newview/llwatchdog.cpp | 13 | ||||
| -rw-r--r-- | indra/test/lldoubledispatch_tut.cpp | 11 | 
9 files changed, 33 insertions, 27 deletions
| diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index e25dae8a90..8db926fddf 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -1268,5 +1268,5 @@ U32 LLParcel::countExperienceKeyType( U32 type )  	return std::count_if(  		boost::begin(mExperienceKeys | boost::adaptors::map_values),   		boost::end(mExperienceKeys | boost::adaptors::map_values),  -		std::bind2nd(std::equal_to<U32>(), type)); +		[type](U32 key){ return (key == type); });  } diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h index 89c9852f4a..5d90b3ef4e 100644 --- a/indra/llui/lldockablefloater.h +++ b/indra/llui/lldockablefloater.h @@ -30,6 +30,7 @@  #include "llerror.h"  #include "llfloater.h"  #include "lldockcontrol.h" +#include <memory>  /**   * Represents floater that can dock. @@ -131,7 +132,7 @@ protected:  	boost::function<BOOL ()> mIsDockedStateForcedCallback;  private: -	std::auto_ptr<LLDockControl> mDockControl; +	std::unique_ptr<LLDockControl> mDockControl;  	LLUIImagePtr mDockTongue;  	static LLHandle<LLFloater> sInstanceHandle;  	/** diff --git a/indra/newview/llappearancemgr.h b/indra/newview/llappearancemgr.h index 8a55a848db..cf953d21ac 100644 --- a/indra/newview/llappearancemgr.h +++ b/indra/newview/llappearancemgr.h @@ -35,6 +35,7 @@  #include "llinventoryobserver.h"  #include "llviewerinventory.h"  #include "llcorehttputil.h" +#include <memory>  class LLWearableHoldingPattern;  class LLInventoryCallback; @@ -276,7 +277,7 @@ private:  	LLUUID mCOFImageID; -	std::auto_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer; +	std::unique_ptr<LLOutfitUnLockTimer> mUnlockOutfitTimer;  	// Set of temp attachment UUIDs that should be removed  	typedef std::set<LLUUID> doomed_temp_attachments_t; diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp index a02bb56489..4f2769a507 100644 --- a/indra/newview/llfavoritesbar.cpp +++ b/indra/newview/llfavoritesbar.cpp @@ -848,8 +848,11 @@ void LLFavoritesBarCtrl::updateButtons(bool force_update)  		if (getChildList()->size() > 0)  		{  			//find last visible child to get the rightest button offset -			child_list_const_reverse_iter_t last_visible_it = std::find_if(childs->rbegin(), childs->rend(),  -					std::mem_fun(&LLView::getVisible)); +			child_list_const_reverse_iter_t last_visible_it = +				std::find_if( +					childs->rbegin(), childs->rend(),  +					[](const child_list_t::value_type& child) +					{ return child->getVisible(); });  			if(last_visible_it != childs->rend())  			{  				last_right_edge = (*last_visible_it)->getRect().mRight; diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp index ffbb0bbee9..279a8f68ea 100644 --- a/indra/newview/llfloater360capture.cpp +++ b/indra/newview/llfloater360capture.cpp @@ -889,8 +889,10 @@ const std::string LLFloater360Capture::generate_proposed_filename()          // this looks complex but it's straightforward - removes all non-alpha chars from a string          // which in this case is the SL region name - we use it as a proposed filename but the user is free to change          std::string region_name = region->getName(); -        std::replace_if(region_name.begin(), region_name.end(), std::not1(std::ptr_fun(isalnum)), '_'); -        if (region_name.length() > 0) +        std::replace_if(region_name.begin(), region_name.end(), +                        [](char c){ return ! std::isalnum(c); }, +                        '_'); +        if (! region_name.empty())          {              filename << region_name;              filename << "_"; diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 296e155d28..bf38a495bb 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -656,13 +656,11 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)  	}  	// call refresh from region on all panels -	std::for_each( -		mInfoPanels.begin(), -		mInfoPanels.end(), -		llbind2nd( -			std::mem_fun(&LLPanelRegionInfo::refreshFromRegion), -			region)); -    mEnvironmentPanel->refreshFromRegion(region); +	for (const auto& infoPanel : mInfoPanels) +	{ +		infoPanel->refreshFromRegion(region); +	} +	mEnvironmentPanel->refreshFromRegion(region);  }  // public diff --git a/indra/newview/lltoast.h b/indra/newview/lltoast.h index 69074b1670..ab559f1e6f 100644 --- a/indra/newview/lltoast.h +++ b/indra/newview/lltoast.h @@ -35,6 +35,7 @@  #include "llviewercontrol.h"  #include "lltexteditor.h" +#include <memory>  #define MOUSE_LEAVE false  #define MOUSE_ENTER true @@ -222,7 +223,7 @@ private:  	LLPanel*	 mWrapperPanel;  	// timer counts a lifetime of a toast -	std::auto_ptr<LLToastLifeTimer> mTimer; +	std::unique_ptr<LLToastLifeTimer> mTimer;  	F32			mToastLifetime; // in seconds  	F32			mToastFadingTime; // in seconds diff --git a/indra/newview/llwatchdog.cpp b/indra/newview/llwatchdog.cpp index 0aa0280b25..ceff5cc8ee 100644 --- a/indra/newview/llwatchdog.cpp +++ b/indra/newview/llwatchdog.cpp @@ -222,18 +222,17 @@ void LLWatchdog::run()  	if(current_run_delta > (WATCHDOG_SLEEP_TIME_USEC * TIME_ELAPSED_MULTIPLIER))  	{  		LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL; -		std::for_each(mSuspects.begin(),  -			mSuspects.end(),  -			std::mem_fun(&LLWatchdogEntry::reset) -			); +		for (const auto& suspect : mSuspects) +		{ +			suspect->reset(); +		}  	}  	else  	{  		SuspectsRegistry::iterator result =   			std::find_if(mSuspects.begin(),  -				mSuspects.end(),  -				std::not1(std::mem_fun(&LLWatchdogEntry::isAlive)) -				); +				mSuspects.end(), +				[](const LLWatchdogEntry* suspect){ return ! suspect->isAlive(); });  		if(result != mSuspects.end())  		{  			// error!!! diff --git a/indra/test/lldoubledispatch_tut.cpp b/indra/test/lldoubledispatch_tut.cpp index ad8f6454d4..dbf55e666f 100644 --- a/indra/test/lldoubledispatch_tut.cpp +++ b/indra/test/lldoubledispatch_tut.cpp @@ -35,8 +35,9 @@  #include "lldoubledispatch.h"  // STL headers  // std headers -#include <string>  #include <iostream> +#include <memory> +#include <string>  #include <typeinfo>  // external library headers  // other Linden headers @@ -135,10 +136,10 @@ namespace tut          // Instantiate a few GameObjects.  Make sure we refer to them          // polymorphically, and don't let them leak. -        std::auto_ptr<GameObject> home; -        std::auto_ptr<GameObject> obstacle; -        std::auto_ptr<GameObject> tug; -        std::auto_ptr<GameObject> patrol; +        std::unique_ptr<GameObject> home; +        std::unique_ptr<GameObject> obstacle; +        std::unique_ptr<GameObject> tug; +        std::unique_ptr<GameObject> patrol;          // prototype objects          Asteroid dummyAsteroid; | 
