diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llenvironment.cpp | 37 | ||||
-rw-r--r-- | indra/newview/llenvironment.h | 4 | ||||
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 30 |
3 files changed, 36 insertions, 35 deletions
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<DayInstance>(); + mCurrentEnvironment = std::make_shared<DayInstance>(); 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<DayInstance>(); + environment = std::make_shared<DayInstance>(); mEnvironments[env] = environment; } @@ -360,7 +361,7 @@ void LLEnvironment::updateEnvironment(F64Seconds transition) if (mCurrentEnvironment != pinstance) { - DayInstance::ptr_t trans = boost::make_shared<DayTransition>( + DayInstance::ptr_t trans = std::make_shared<DayTransition>( 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<LLSettingsBlender>(ptargetsky, psky, pinstance->getSky(), transition); +// LLSettingsBlender::ptr_t skyblend = std::make_shared<LLSettingsBlender>(ptargetsky, psky, pinstance->getSky(), transition); // skyblend->setOnFinished(boost::bind(&LLEnvironment::onTransitionDone, this, _1, true)); -// LLSettingsBlender::ptr_t waterblend = boost::make_shared<LLSettingsBlender>(ptargetwater, pwater, pinstance->getWater(), transition); +// LLSettingsBlender::ptr_t waterblend = std::make_shared<LLSettingsBlender>(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<LLSettingsSky>((*it).second); + return std::static_pointer_cast<LLSettingsSky>((*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<LLSettingsWater>((*it).second); + return std::static_pointer_cast<LLSettingsWater>((*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<LLSettingsDay>((*it).second); + return std::static_pointer_cast<LLSettingsDay>((*it).second); } @@ -1071,7 +1072,7 @@ LLEnvironment::EnvironmentInfo::EnvironmentInfo(): LLEnvironment::EnvironmentInfo::ptr_t LLEnvironment::EnvironmentInfo::extract(LLSD environment) { - ptr_t pinfo = boost::make_shared<EnvironmentInfo>(); + ptr_t pinfo = std::make_shared<EnvironmentInfo>(); 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<LLSettingsWater>((*(wtrack.begin())).second); + mWater = std::static_pointer_cast<LLSettingsWater>((*(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<LLSettingsVOWater>((*bounds.first).second)->buildClone(); - mBlenderWater = boost::make_shared<LLSettingsBlender>(mWater, + mWater = std::static_pointer_cast<LLSettingsVOWater>((*bounds.first).second)->buildClone(); + mBlenderWater = std::make_shared<LLSettingsBlender>(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<LLSettingsSky>((*(track.begin())).second); + mSky = std::static_pointer_cast<LLSettingsSky>((*(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<LLSettingsVOSky>((*bounds.first).second)->buildClone(); - mBlenderSky = boost::make_shared<LLSettingsBlender>(mSky, + mSky = std::static_pointer_cast<LLSettingsVOSky>((*bounds.first).second)->buildClone(); + mBlenderSky = std::make_shared<LLSettingsBlender>(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<LLSettingsBlender>(mWater, mStartWater, mNextInstance->getWater(), mTransitionTime); + mBlenderWater = std::make_shared<LLSettingsBlender>(mWater, mStartWater, mNextInstance->getWater(), mTransitionTime); mBlenderWater->setOnFinished(boost::bind(&LLEnvironment::DayTransition::onTransitonDone, this, LLSettingsDay::TRACK_WATER, _1)); mSky = mStartSky->buildClone(); - mBlenderSky = boost::make_shared<LLSettingsBlender>(mSky, mStartSky, mNextInstance->getSky(), mTransitionTime); + mBlenderSky = std::make_shared<LLSettingsBlender>(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<EnvironmentInfo> ptr_t; + typedef std::shared_ptr<EnvironmentInfo> ptr_t; S32 mParcelId; LLUUID mRegionId; @@ -217,7 +217,7 @@ private: TYPE_FIXED, TYPE_CYCLED }; - typedef boost::shared_ptr<DayInstance> ptr_t; + typedef std::shared_ptr<DayInstance> 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<LLSettingsVOSky>(newsettings); + LLSettingsSky::ptr_t skyp = std::make_shared<LLSettingsVOSky>(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<LLSettingsVOSky>(settings); + LLSettingsSky::ptr_t skyp = std::make_shared<LLSettingsVOSky>(settings); return skyp; } @@ -140,7 +140,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildClone() LLSettingsSky::ptr_t(); } - LLSettingsSky::ptr_t skyp = boost::make_shared<LLSettingsVOSky>(settings); + LLSettingsSky::ptr_t skyp = std::make_shared<LLSettingsVOSky>(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<LLSettingsVOWater>(newsettings); + LLSettingsWater::ptr_t waterp = std::make_shared<LLSettingsVOWater>(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<LLSettingsVOWater>(settings); + LLSettingsWater::ptr_t waterp = std::make_shared<LLSettingsVOWater>(settings); return waterp; } @@ -312,7 +312,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildClone() return LLSettingsWater::ptr_t(); } - LLSettingsWater::ptr_t waterp = boost::make_shared<LLSettingsVOWater>(settings); + LLSettingsWater::ptr_t waterp = std::make_shared<LLSettingsVOWater>(settings); return waterp; } @@ -459,7 +459,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n } - LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsVODay>(newsettings); + LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(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<LLSettingsVODay>(newsettings); + LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(newsettings); if (dayp) { @@ -547,7 +547,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDefaultDayCycle() LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsVODay>(settings); + LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(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<LLSettingsVODay>(settings); + LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(settings); dayp->initialize(); return dayp; @@ -582,7 +582,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone() LLSettingsDay::ptr_t(); } - LLSettingsDay::ptr_t dayp = boost::make_shared<LLSettingsVODay>(settings); + LLSettingsDay::ptr_t dayp = std::make_shared<LLSettingsVODay>(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<LLSettingsWater>((*trackwater.begin()).second); + pwater = std::static_pointer_cast<LLSettingsWater>((*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<LLSettingsSky>((*it).second); + skys[name.str()] = std::static_pointer_cast<LLSettingsSky>((*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<LLSettingsVOSky>(settings); + LLSettingsSky::ptr_t skyp = std::make_shared<LLSettingsVOSky>(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<LLSettingsVOWater>(settings); + LLSettingsWater::ptr_t waterp = std::make_shared<LLSettingsVOWater>(settings); if (waterp->validate()) return waterp; |