Altered vector_replace_with_last to work around MSVC2010 compiler bug.
This commit is contained in:
@@ -241,12 +241,12 @@ inline typename T::mapped_type get_ptr_in_map(const T& inmap, typename T::key_ty
|
|||||||
template <typename T>
|
template <typename T>
|
||||||
inline typename T::iterator vector_replace_with_last(T& invec, typename T::iterator& iter)
|
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())
|
if (iter == invec.end())
|
||||||
{
|
{
|
||||||
return iter;
|
return iter;
|
||||||
}
|
}
|
||||||
else if (iter == last)
|
else if (iter == --last)
|
||||||
{
|
{
|
||||||
invec.pop_back();
|
invec.pop_back();
|
||||||
return invec.end();
|
return invec.end();
|
||||||
|
|||||||
Reference in New Issue
Block a user