summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/lldarray.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llcommon/lldarray.h b/indra/llcommon/lldarray.h
index 3b46706d42..c7268b8dab 100644
--- a/indra/llcommon/lldarray.h
+++ b/indra/llcommon/lldarray.h
@@ -119,11 +119,12 @@ inline S32 LLDynamicArray<Type,BlockSize>::removeObj(const Type& obj)
typename std::vector<Type>::iterator iter = std::find(this->begin(), this->end(), obj);
if (iter != this->end())
{
+ S32 res = iter - this->begin();
typename std::vector<Type>::iterator last = this->end();
--last;
*iter = *last;
this->pop_back();
- return iter - this->begin();
+ return res;
}
return FAIL;
}