From 618ca2f011469d602bf51b1d363b177bb9af3469 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Wed, 27 Feb 2019 09:53:36 -0500 Subject: [PATCH] Code cleansies --- indra/newview/llpaneleditwearable.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp index ad132c6a9..47b01bfed 100644 --- a/indra/newview/llpaneleditwearable.cpp +++ b/indra/newview/llpaneleditwearable.cpp @@ -511,12 +511,8 @@ void for_each_picker_ctrl_entry(LLPanel* panel, LLWearableType::EType type, func return; } const texture_vec_t& indexes = get_pickers_indexes(wearable_entry); - for (texture_vec_t::const_iterator - iter = indexes.begin(), - iter_end = indexes.end(); - iter != iter_end; ++iter) + for (const auto& te : indexes) { - const ETextureIndex te = *iter; const LLEditWearableDictionary::PickerControlEntry* entry = get_picker_entry(te); if (!entry) { @@ -695,9 +691,7 @@ BOOL LLPanelEditWearable::postBuild() mTakeOff = getChild("Take Off"); // If PG, can't take off underclothing or shirt - mCanTakeOff = - LLWearableType::getAssetType( mType ) == LLAssetType::AT_CLOTHING && - !( gAgent.isTeen() && (mType == LLWearableType::WT_UNDERSHIRT || mType == LLWearableType::WT_UNDERPANTS) ); + mCanTakeOff = !(gAgent.isTeen() && (mType == LLWearableType::WT_UNDERSHIRT || mType == LLWearableType::WT_UNDERPANTS) ); mTakeOff->setVisible(mCanTakeOff); mTakeOff->setCommitCallback(boost::bind(&LLPanelEditWearable::onBtnTakeOff, this) ); @@ -707,7 +701,7 @@ BOOL LLPanelEditWearable::postBuild() } mSave = getChild("Save"); - mSave->setCommitCallback(boost::bind(&LLPanelEditWearable::saveChanges, this, false, std::string()) ); + mSave->setCommitCallback(boost::bind(&LLPanelEditWearable::saveChanges, this, false, LLStringUtil::null) ); mSaveAs = getChild("Save As"); mSaveAs->setCommitCallback(boost::bind(&LLPanelEditWearable::onBtnSaveAs, this) ); @@ -811,7 +805,7 @@ void LLPanelEditWearable::draw() BOOL is_modifiable = FALSE; BOOL is_copyable = FALSE; BOOL is_complete = FALSE; - LLInventoryItem* item = NULL; + LLInventoryItem* item = nullptr; if (wearable && (item = gInventory.getItem(wearable->getItemID()))) { const LLPermissions& perm = item->getPermissions();