From 165af85894a8f7aa39e858c4eb8b756994b3fcd0 Mon Sep 17 00:00:00 2001 From: Shyotl Date: Sun, 22 Jun 2014 03:40:12 -0500 Subject: [PATCH] Altered vector_replace_with_last to work around MSVC2010 compiler bug. --- indra/llcommon/llstl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llstl.h b/indra/llcommon/llstl.h index ec98bb911..2e3d52733 100644 --- a/indra/llcommon/llstl.h +++ b/indra/llcommon/llstl.h @@ -241,12 +241,12 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty template inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator& iter) { - typename T::iterator last = invec.end(); --last; + typename T::iterator last = invec.end(); if (iter == invec.end()) { return iter; } - else if (iter == last) + else if (iter == --last) { invec.pop_back(); return invec.end();