aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/lldarray.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/lldarray.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/linden/indra/llcommon/lldarray.h b/linden/indra/llcommon/lldarray.h
index 9bffd63..45e564f 100644
--- a/linden/indra/llcommon/lldarray.h
+++ b/linden/indra/llcommon/lldarray.h
@@ -119,11 +119,12 @@ inline S32 LLDynamicArray<Type,BlockSize>::removeObj(const Type& obj)
119 typename std::vector<Type>::iterator iter = std::find(this->begin(), this->end(), obj); 119 typename std::vector<Type>::iterator iter = std::find(this->begin(), this->end(), obj);
120 if (iter != this->end()) 120 if (iter != this->end())
121 { 121 {
122 S32 res = iter - this->begin();
122 typename std::vector<Type>::iterator last = this->end(); 123 typename std::vector<Type>::iterator last = this->end();
123 --last; 124 --last;
124 *iter = *last; 125 *iter = *last;
125 this->pop_back(); 126 this->pop_back();
126 return iter - this->begin(); 127 return res;
127 } 128 }
128 return FAIL; 129 return FAIL;
129} 130}