SL-15241: Tweak viewer sources to permit compiling on Mac with C++17.
parent
ce65bc2f13
commit
26fb5d7af7
|
|
@ -175,7 +175,7 @@ if (DARWIN)
|
|||
# Until we decide to set -std=c++14 in viewer-build-variables/variables, set
|
||||
# it locally here: we want to at least prevent inadvertently reintroducing
|
||||
# viewer code that would fail with C++14.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++14")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${DARWIN_extra_cstar_flags} -std=c++17")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${DARWIN_extra_cstar_flags}")
|
||||
# NOTE: it's critical that the optimization flag is put in front.
|
||||
# NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
|
||||
|
|
|
|||
|
|
@ -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; });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public:
|
|||
*
|
||||
* By default returns false.
|
||||
*/
|
||||
virtual bool overlapsScreenChannel() { return mOverlapsScreenChannel && getVisible() && isDocked(); }
|
||||
virtual bool overlapsScreenChannel() const { return mOverlapsScreenChannel && getVisible() && isDocked(); }
|
||||
virtual void setOverlapsScreenChannel(bool overlaps) { mOverlapsScreenChannel = overlaps; }
|
||||
|
||||
bool getUniqueDocking() { return mUniqueDocking; }
|
||||
|
|
@ -131,7 +131,7 @@ protected:
|
|||
boost::function<BOOL ()> mIsDockedStateForcedCallback;
|
||||
|
||||
private:
|
||||
std::auto_ptr<LLDockControl> mDockControl;
|
||||
std::unique_ptr<LLDockControl> mDockControl;
|
||||
LLUIImagePtr mDockTongue;
|
||||
static LLHandle<LLFloater> sInstanceHandle;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -276,7 +276,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;
|
||||
|
|
|
|||
|
|
@ -828,7 +828,7 @@ void LLFavoritesBarCtrl::updateButtons()
|
|||
{
|
||||
//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_t::value_type child){ return child->getVisible(); });
|
||||
if(last_visible_it != childs->rend())
|
||||
{
|
||||
last_right_edge = (*last_visible_it)->getRect().mRight;
|
||||
|
|
|
|||
|
|
@ -636,9 +636,7 @@ void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region)
|
|||
std::for_each(
|
||||
mInfoPanels.begin(),
|
||||
mInfoPanels.end(),
|
||||
llbind2nd(
|
||||
std::mem_fun(&LLPanelRegionInfo::refreshFromRegion),
|
||||
region));
|
||||
[region](info_panels_t::value_type panel){ panel->refreshFromRegion(region); });
|
||||
mEnvironmentPanel->refreshFromRegion(region);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -237,7 +237,7 @@ private:
|
|||
LLToggleableMenu* mGearMenu;
|
||||
LLToggleableMenu* mAddWearablesGearMenu;
|
||||
bool mInitialized;
|
||||
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
std::unique_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
LLMenuButton* mWearablesGearMenuBtn;
|
||||
LLMenuButton* mGearMenuBtn;
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ protected:
|
|||
private:
|
||||
LLTabContainer* mAppearanceTabs;
|
||||
std::string mFilterSubString;
|
||||
std::auto_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
std::unique_ptr<LLSaveOutfitComboBtn> mSaveComboBtn;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////
|
||||
// tab panels //
|
||||
|
|
|
|||
|
|
@ -222,7 +222,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
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ void LLWatchdog::run()
|
|||
LL_INFOS() << "Watchdog thread delayed: resetting entries." << LL_ENDL;
|
||||
std::for_each(mSuspects.begin(),
|
||||
mSuspects.end(),
|
||||
std::mem_fun(&LLWatchdogEntry::reset)
|
||||
[](SuspectsRegistry::value_type suspect){ suspect->reset(); }
|
||||
);
|
||||
}
|
||||
else
|
||||
|
|
@ -243,7 +243,7 @@ void LLWatchdog::run()
|
|||
SuspectsRegistry::iterator result =
|
||||
std::find_if(mSuspects.begin(),
|
||||
mSuspects.end(),
|
||||
std::not1(std::mem_fun(&LLWatchdogEntry::isAlive))
|
||||
[](SuspectsRegistry::value_type suspect){ return ! suspect->isAlive(); }
|
||||
);
|
||||
if(result != mSuspects.end())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -135,10 +135,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue