Minor cleanup.
This commit is contained in:
@@ -239,7 +239,7 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty
|
|||||||
//
|
//
|
||||||
//Singu note: This has been generalized to support a broader range of sequence containers
|
//Singu note: This has been generalized to support a broader range of sequence containers
|
||||||
template <typename T>
|
template <typename T>
|
||||||
inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator& iter)
|
inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator iter)
|
||||||
{
|
{
|
||||||
typename T::iterator last = invec.end();
|
typename T::iterator last = invec.end();
|
||||||
if (iter == invec.end())
|
if (iter == invec.end())
|
||||||
|
|||||||
@@ -301,8 +301,7 @@ void LLFacePool::removeFaceReference(LLFace *facep)
|
|||||||
if (idx != -1)
|
if (idx != -1)
|
||||||
{
|
{
|
||||||
facep->setReferenceIndex(-1);
|
facep->setReferenceIndex(-1);
|
||||||
std::vector<LLFace*>::iterator face_it(mReferences.begin() + idx);
|
std::vector<LLFace*>::iterator iter = vector_replace_with_last(mReferences, mReferences.begin() + idx);
|
||||||
std::vector<LLFace*>::iterator iter = vector_replace_with_last(mReferences, face_it);
|
|
||||||
if(iter != mReferences.end())
|
if(iter != mReferences.end())
|
||||||
(*iter)->setReferenceIndex(idx);
|
(*iter)->setReferenceIndex(idx);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,8 +80,7 @@ LLVolumeImplFlexible::LLVolumeImplFlexible(LLViewerObject* vo, LLFlexibleObjectD
|
|||||||
|
|
||||||
LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
LLVolumeImplFlexible::~LLVolumeImplFlexible()
|
||||||
{
|
{
|
||||||
std::vector<LLVolumeImplFlexible*>::iterator flex_it(sInstanceList.begin() + mInstanceIndex);
|
std::vector<LLVolumeImplFlexible*>::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex);
|
||||||
std::vector<LLVolumeImplFlexible*>::iterator iter = vector_replace_with_last(sInstanceList, flex_it);
|
|
||||||
if(iter != sInstanceList.end())
|
if(iter != sInstanceList.end())
|
||||||
(*iter)->mInstanceIndex = mInstanceIndex;
|
(*iter)->mInstanceIndex = mInstanceIndex;
|
||||||
std::vector<U32>::iterator update_it(sUpdateDelay.begin() + mInstanceIndex);
|
std::vector<U32>::iterator update_it(sUpdateDelay.begin() + mInstanceIndex);
|
||||||
|
|||||||
@@ -1459,8 +1459,7 @@ void LLViewerObjectList::removeFromActiveList(LLViewerObject* objectp)
|
|||||||
|
|
||||||
objectp->setListIndex(-1);
|
objectp->setListIndex(-1);
|
||||||
|
|
||||||
std::vector<LLPointer<LLViewerObject> >::iterator it(mActiveObjects.begin() + idx);
|
std::vector<LLPointer<LLViewerObject> >::iterator iter = vector_replace_with_last(mActiveObjects, mActiveObjects.begin() + idx);
|
||||||
std::vector<LLPointer<LLViewerObject> >::iterator iter = vector_replace_with_last(mActiveObjects, it);
|
|
||||||
if(iter != mActiveObjects.end())
|
if(iter != mActiveObjects.end())
|
||||||
(*iter)->setListIndex(idx);
|
(*iter)->setListIndex(idx);
|
||||||
|
|
||||||
|
|||||||
@@ -406,8 +406,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
|||||||
// Kill dead particles (either flagged dead, or too old)
|
// Kill dead particles (either flagged dead, or too old)
|
||||||
if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags))
|
if ((part->mLastUpdateTime > part->mMaxAge) || (LLViewerPart::LL_PART_DEAD_MASK == part->mFlags))
|
||||||
{
|
{
|
||||||
part_list_t::iterator it(mParticles.begin() + i);
|
vector_replace_with_last(mParticles, mParticles.begin() + i);
|
||||||
vector_replace_with_last(mParticles, it);
|
|
||||||
delete part ;
|
delete part ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -417,8 +416,7 @@ void LLViewerPartGroup::updateParticles(const F32 lastdt)
|
|||||||
{
|
{
|
||||||
// Transfer particles between groups
|
// Transfer particles between groups
|
||||||
LLViewerPartSim::getInstance()->put(part) ;
|
LLViewerPartSim::getInstance()->put(part) ;
|
||||||
part_list_t::iterator it(mParticles.begin() + i);
|
vector_replace_with_last(mParticles, mParticles.begin() + i);
|
||||||
vector_replace_with_last(mParticles, it);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -723,8 +721,7 @@ void LLViewerPartSim::updateSimulation()
|
|||||||
|
|
||||||
if (mViewerPartSources[i]->isDead())
|
if (mViewerPartSources[i]->isDead())
|
||||||
{
|
{
|
||||||
source_list_t::iterator it(mViewerPartSources.begin() + i);
|
vector_replace_with_last(mViewerPartSources, mViewerPartSources.begin() + i);
|
||||||
vector_replace_with_last(mViewerPartSources, it);
|
|
||||||
//mViewerPartSources.erase(it);
|
//mViewerPartSources.erase(it);
|
||||||
count--;
|
count--;
|
||||||
}
|
}
|
||||||
@@ -761,8 +758,7 @@ void LLViewerPartSim::updateSimulation()
|
|||||||
if (!mViewerPartGroups[i]->getCount())
|
if (!mViewerPartGroups[i]->getCount())
|
||||||
{
|
{
|
||||||
delete mViewerPartGroups[i];
|
delete mViewerPartGroups[i];
|
||||||
group_list_t::iterator it(mViewerPartGroups.begin() + i);
|
vector_replace_with_last(mViewerPartGroups, mViewerPartGroups.begin() + i);
|
||||||
vector_replace_with_last(mViewerPartGroups, it);
|
|
||||||
//mViewerPartGroups.erase(it);
|
//mViewerPartGroups.erase(it);
|
||||||
i--;
|
i--;
|
||||||
count--;
|
count--;
|
||||||
|
|||||||
@@ -49,8 +49,7 @@ LLViewerTextureAnim::LLViewerTextureAnim(LLVOVolume* vobj) : LLTextureAnim()
|
|||||||
|
|
||||||
LLViewerTextureAnim::~LLViewerTextureAnim()
|
LLViewerTextureAnim::~LLViewerTextureAnim()
|
||||||
{
|
{
|
||||||
std::vector<LLViewerTextureAnim*>::iterator it(sInstanceList.begin() + mInstanceIndex);
|
std::vector<LLViewerTextureAnim*>::iterator iter = vector_replace_with_last(sInstanceList, sInstanceList.begin() + mInstanceIndex);
|
||||||
std::vector<LLViewerTextureAnim*>::iterator iter = vector_replace_with_last(sInstanceList, it);
|
|
||||||
if(iter != sInstanceList.end())
|
if(iter != sInstanceList.end())
|
||||||
(*iter)->mInstanceIndex = mInstanceIndex;
|
(*iter)->mInstanceIndex = mInstanceIndex;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user