diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llcommon/lldarray.h | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llcommon/lldarray.h | 3 |
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 | } |