Altered vector_replace_with_last to work around MSVC2010 compiler bug.

This commit is contained in:
Shyotl
2014-06-22 03:40:12 -05:00
parent 7c073c1db7
commit 165af85894

View File

@@ -241,12 +241,12 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty
template <typename T>
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();