From 7838189843ff3b9c800e458b2452943edbc202ea Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Feb 2018 17:27:56 -0800 Subject: boost->std & same level interp --- indra/llinventory/llsettingsbase.h | 9 ++++----- indra/llinventory/llsettingsdaycycle.h | 6 +++--- indra/llinventory/llsettingssky.cpp | 2 +- indra/llinventory/llsettingssky.h | 2 +- indra/llinventory/llsettingswater.cpp | 2 +- indra/llinventory/llsettingswater.h | 2 +- indra/newview/llenvironment.cpp | 37 +++++++++++++++++----------------- indra/newview/llenvironment.h | 4 ++-- indra/newview/llsettingsvo.cpp | 30 +++++++++++++-------------- 9 files changed, 47 insertions(+), 47 deletions(-) diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index 073e4616a5..420bcb9943 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -31,7 +31,6 @@ #include #include #include -#include #include #include "llsd.h" @@ -44,7 +43,7 @@ #include "v3color.h" class LLSettingsBase : - public boost::enable_shared_from_this, + public std::enable_shared_from_this, private boost::noncopyable { friend class LLEnvironment; @@ -58,7 +57,7 @@ public: typedef std::map parammapping_t; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; virtual ~LLSettingsBase() { }; @@ -237,10 +236,10 @@ private: }; -class LLSettingsBlender : public boost::enable_shared_from_this +class LLSettingsBlender : public std::enable_shared_from_this { public: - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; typedef boost::signals2::signal finish_signal_t; typedef boost::signals2::connection connection_t; diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h index 8a1634d674..4c7ce011a1 100644 --- a/indra/llinventory/llsettingsdaycycle.h +++ b/indra/llinventory/llsettingsdaycycle.h @@ -33,8 +33,8 @@ class LLSettingsWater; class LLSettingsSky; -typedef boost::shared_ptr LLSettingsWaterPtr_t; -typedef boost::shared_ptr LLSettingsSkyPtr_t; +typedef std::shared_ptr LLSettingsWaterPtr_t; +typedef std::shared_ptr LLSettingsSkyPtr_t; class LLSettingsDay : public LLSettingsBase { @@ -60,7 +60,7 @@ public: typedef std::map CycleTrack_t; typedef std::vector CycleList_t; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; typedef std::vector KeyframeList_t; typedef std::pair TrackBound_t; diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 32b292e384..572b5703b3 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -98,7 +98,7 @@ LLSettingsSky::LLSettingsSky(): void LLSettingsSky::blend(const LLSettingsBase::ptr_t &end, F64 blendf) { - LLSettingsSky::ptr_t other = boost::static_pointer_cast(end); + LLSettingsSky::ptr_t other = std::static_pointer_cast(end); LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf); replaceSettings(blenddata); diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 9947ffc022..e9ffbdb32c 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -62,7 +62,7 @@ public: static const std::string SETTING_SUN_ROTATION; static const std::string SETTING_SUN_TEXUTUREID; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; typedef std::pair azimalt_t; //--------------------------------------------------------------------- diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp index 0fe3de44d3..a72cbc4136 100644 --- a/indra/llinventory/llsettingswater.cpp +++ b/indra/llinventory/llsettingswater.cpp @@ -163,7 +163,7 @@ LLSD LLSettingsWater::translateLegacySettings(LLSD legacy) void LLSettingsWater::blend(const LLSettingsBase::ptr_t &end, F64 blendf) { - LLSettingsWater::ptr_t other = boost::static_pointer_cast(end); + LLSettingsWater::ptr_t other = std::static_pointer_cast(end); LLSD blenddata = interpolateSDMap(mSettings, other->mSettings, blendf); replaceSettings(blenddata); diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h index 4c61e2a34c..4d206a1be0 100644 --- a/indra/llinventory/llsettingswater.h +++ b/indra/llinventory/llsettingswater.h @@ -48,7 +48,7 @@ public: static const LLUUID DEFAULT_WATER_NORMAL_ID; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; //--------------------------------------------------------------------- LLSettingsWater(const LLSD &data); diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index cb1d85bed2..cf5a68fdd2 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -98,7 +98,7 @@ void LLEnvironment::initSingleton() LLSettingsDay::ptr_t p_default_day = LLSettingsVODay::buildDefaultDayCycle(); addDayCycle(p_default_day); - mCurrentEnvironment = boost::make_shared(); + mCurrentEnvironment = std::make_shared(); mCurrentEnvironment->setSky(p_default_sky); mCurrentEnvironment->setWater(p_default_water); @@ -221,9 +221,10 @@ bool LLEnvironment::hasEnvironment(LLEnvironment::EnvSelection_t env) LLEnvironment::DayInstance::ptr_t LLEnvironment::getEnvironmentInstance(LLEnvironment::EnvSelection_t env, bool create /*= false*/) { DayInstance::ptr_t environment = mEnvironments[env]; - if (!environment && create) +// if (!environment && create) + if (create) { - environment = boost::make_shared(); + environment = std::make_shared(); mEnvironments[env] = environment; } @@ -360,7 +361,7 @@ void LLEnvironment::updateEnvironment(F64Seconds transition) if (mCurrentEnvironment != pinstance) { - DayInstance::ptr_t trans = boost::make_shared( + DayInstance::ptr_t trans = std::make_shared( mCurrentEnvironment->getSky(), mCurrentEnvironment->getWater(), pinstance, transition); trans->animate(); @@ -373,9 +374,9 @@ void LLEnvironment::updateEnvironment(F64Seconds transition) // LLSettingsSky::ptr_t ptargetsky = psky->buildClone(); // LLSettingsWater::ptr_t ptargetwater = pwater->buildClone(); // -// LLSettingsBlender::ptr_t skyblend = boost::make_shared(ptargetsky, psky, pinstance->getSky(), transition); +// LLSettingsBlender::ptr_t skyblend = std::make_shared(ptargetsky, psky, pinstance->getSky(), transition); // skyblend->setOnFinished(boost::bind(&LLEnvironment::onTransitionDone, this, _1, true)); -// LLSettingsBlender::ptr_t waterblend = boost::make_shared(ptargetwater, pwater, pinstance->getWater(), transition); +// LLSettingsBlender::ptr_t waterblend = std::make_shared(ptargetwater, pwater, pinstance->getWater(), transition); // waterblend->setOnFinished(boost::bind(&LLEnvironment::onTransitionDone, this, _1, false)); // // pinstance->setBlenders(skyblend, waterblend); @@ -687,7 +688,7 @@ LLSettingsSky::ptr_t LLEnvironment::findSkyByName(std::string name) const return LLSettingsSky::ptr_t(); } - return boost::static_pointer_cast((*it).second); + return std::static_pointer_cast((*it).second); } LLSettingsWater::ptr_t LLEnvironment::findWaterByName(std::string name) const @@ -700,7 +701,7 @@ LLSettingsWater::ptr_t LLEnvironment::findWaterByName(std::string name) const return LLSettingsWater::ptr_t(); } - return boost::static_pointer_cast((*it).second); + return std::static_pointer_cast((*it).second); } LLSettingsDay::ptr_t LLEnvironment::findDayCycleByName(std::string name) const @@ -713,7 +714,7 @@ LLSettingsDay::ptr_t LLEnvironment::findDayCycleByName(std::string name) const return LLSettingsDay::ptr_t(); } - return boost::static_pointer_cast((*it).second); + return std::static_pointer_cast((*it).second); } @@ -1071,7 +1072,7 @@ LLEnvironment::EnvironmentInfo::EnvironmentInfo(): LLEnvironment::EnvironmentInfo::ptr_t LLEnvironment::EnvironmentInfo::extract(LLSD environment) { - ptr_t pinfo = boost::make_shared(); + ptr_t pinfo = std::make_shared(); if (environment.has("parcel_id")) pinfo->mParcelId = environment["parcel_id"].asInteger(); @@ -1444,7 +1445,7 @@ void LLEnvironment::DayInstance::animate() } else if (wtrack.size() == 1) { - mWater = boost::static_pointer_cast((*(wtrack.begin())).second); + mWater = std::static_pointer_cast((*(wtrack.begin())).second); mBlenderWater.reset(); } else @@ -1452,8 +1453,8 @@ void LLEnvironment::DayInstance::animate() LLSettingsDay::TrackBound_t bounds = get_bounding_entries(wtrack, secondsToKeyframe(now)); F64Seconds timespan = mDayLength * get_wrapping_distance((*bounds.first).first, (*bounds.second).first); - mWater = boost::static_pointer_cast((*bounds.first).second)->buildClone(); - mBlenderWater = boost::make_shared(mWater, + mWater = std::static_pointer_cast((*bounds.first).second)->buildClone(); + mBlenderWater = std::make_shared(mWater, (*bounds.first).second, (*bounds.second).second, timespan); mBlenderWater->setOnFinished(boost::bind(&LLEnvironment::DayInstance::onTrackTransitionDone, this, 0, _1)); } @@ -1469,7 +1470,7 @@ void LLEnvironment::DayInstance::animate() } else if (track.size() == 1) { - mSky = boost::static_pointer_cast((*(track.begin())).second); + mSky = std::static_pointer_cast((*(track.begin())).second); mBlenderSky.reset(); } else @@ -1477,8 +1478,8 @@ void LLEnvironment::DayInstance::animate() LLSettingsDay::TrackBound_t bounds = get_bounding_entries(track, secondsToKeyframe(now)); F64Seconds timespan = mDayLength * get_wrapping_distance((*bounds.first).first, (*bounds.second).first); - mSky = boost::static_pointer_cast((*bounds.first).second)->buildClone(); - mBlenderSky = boost::make_shared(mSky, + mSky = std::static_pointer_cast((*bounds.first).second)->buildClone(); + mBlenderSky = std::make_shared(mSky, (*bounds.first).second, (*bounds.second).second, timespan); mBlenderSky->setOnFinished(boost::bind(&LLEnvironment::DayInstance::onTrackTransitionDone, this, 1, _1)); } @@ -1528,11 +1529,11 @@ void LLEnvironment::DayTransition::animate() mNextInstance->animate(); mWater = mStartWater->buildClone(); - mBlenderWater = boost::make_shared(mWater, mStartWater, mNextInstance->getWater(), mTransitionTime); + mBlenderWater = std::make_shared(mWater, mStartWater, mNextInstance->getWater(), mTransitionTime); mBlenderWater->setOnFinished(boost::bind(&LLEnvironment::DayTransition::onTransitonDone, this, LLSettingsDay::TRACK_WATER, _1)); mSky = mStartSky->buildClone(); - mBlenderSky = boost::make_shared(mSky, mStartSky, mNextInstance->getSky(), mTransitionTime); + mBlenderSky = std::make_shared(mSky, mStartSky, mNextInstance->getSky(), mTransitionTime); mBlenderSky->setOnFinished(boost::bind(&LLEnvironment::DayTransition::onTransitonDone, this, LLSettingsDay::TRACK_MAX, _1)); } diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 2b045e483c..06bcd368dd 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -58,7 +58,7 @@ public: { EnvironmentInfo(); - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; S32 mParcelId; LLUUID mRegionId; @@ -217,7 +217,7 @@ private: TYPE_FIXED, TYPE_CYCLED }; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; DayInstance(); virtual ~DayInstance() { }; diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index eadc035b3b..6b1c663357 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -94,7 +94,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildFromLegacyPreset(const std::string &n LLSettingsSky::ptr_t(); } - LLSettingsSky::ptr_t skyp = boost::make_shared(newsettings); + LLSettingsSky::ptr_t skyp = std::make_shared(newsettings); #ifdef VERIFY_LEGACY_CONVERSION LLSD oldsettings = LLSettingsVOSky::convertToLegacy(skyp); @@ -124,7 +124,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildDefaultSky() LLSettingsSky::ptr_t(); } - LLSettingsSky::ptr_t skyp = boost::make_shared(settings); + LLSettingsSky::ptr_t skyp = std::make_shared(settings); return skyp; } @@ -140,7 +140,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildClone() LLSettingsSky::ptr_t(); } - LLSettingsSky::ptr_t skyp = boost::make_shared(settings); + LLSettingsSky::ptr_t skyp = std::make_shared(settings); return skyp; } @@ -267,7 +267,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildFromLegacyPreset(const std::strin return LLSettingsWater::ptr_t(); } - LLSettingsWater::ptr_t waterp = boost::make_shared(newsettings); + LLSettingsWater::ptr_t waterp = std::make_shared(newsettings); #ifdef VERIFY_LEGACY_CONVERSION LLSD oldsettings = LLSettingsVOWater::convertToLegacy(waterp); @@ -296,7 +296,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildDefaultWater() return LLSettingsWater::ptr_t(); } - LLSettingsWater::ptr_t waterp = boost::make_shared(settings); + LLSettingsWater::ptr_t waterp = std::make_shared(settings); return waterp; } @@ -312,7 +312,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildClone() return LLSettingsWater::ptr_t(); } - LLSettingsWater::ptr_t waterp = boost::make_shared(settings); + LLSettingsWater::ptr_t waterp = std::make_shared(settings); return waterp; } @@ -459,7 +459,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n } - LLSettingsDay::ptr_t dayp = boost::make_shared(newsettings); + LLSettingsDay::ptr_t dayp = std::make_shared(newsettings); #ifdef VERIFY_LEGACY_CONVERSION LLSD testsettings = LLSettingsVODay::convertToLegacy(dayp); @@ -525,7 +525,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyMessage(const LLUUID ®io return LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared(newsettings); + LLSettingsDay::ptr_t dayp = std::make_shared(newsettings); if (dayp) { @@ -547,7 +547,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDefaultDayCycle() LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared(settings); + LLSettingsDay::ptr_t dayp = std::make_shared(settings); dayp->initialize(); return dayp; @@ -563,7 +563,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromEnvironmentMessage(LLSD settings) LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared(settings); + LLSettingsDay::ptr_t dayp = std::make_shared(settings); dayp->initialize(); return dayp; @@ -582,7 +582,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone() LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared(settings); + LLSettingsDay::ptr_t dayp = std::make_shared(settings); dayp->initialize(); return dayp; @@ -595,7 +595,7 @@ LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday) LLSettingsWater::ptr_t pwater; if (!trackwater.empty()) { - pwater = boost::static_pointer_cast((*trackwater.begin()).second); + pwater = std::static_pointer_cast((*trackwater.begin()).second); } if (!pwater) @@ -615,7 +615,7 @@ LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday) name << hash; - skys[name.str()] = boost::static_pointer_cast((*it).second); + skys[name.str()] = std::static_pointer_cast((*it).second); F32 frame = ((tracksky.size() == 1) && (it == tracksky.begin())) ? -1.0f : (*it).first; llsdcycle.append( LLSDArray(LLSD::Real(frame))(name.str()) ); @@ -649,7 +649,7 @@ LLSettingsWaterPtr_t LLSettingsVODay::getDefaultWater() const LLSettingsSkyPtr_t LLSettingsVODay::buildSky(LLSD settings) const { - LLSettingsSky::ptr_t skyp = boost::make_shared(settings); + LLSettingsSky::ptr_t skyp = std::make_shared(settings); if (skyp->validate()) return skyp; @@ -659,7 +659,7 @@ LLSettingsSkyPtr_t LLSettingsVODay::buildSky(LLSD settings) const LLSettingsWaterPtr_t LLSettingsVODay::buildWater(LLSD settings) const { - LLSettingsWater::ptr_t waterp = boost::make_shared(settings); + LLSettingsWater::ptr_t waterp = std::make_shared(settings); if (waterp->validate()) return waterp; -- cgit v1.2.3