|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r82814 - trunk/boost/container
From: igaztanaga_at_[hidden]
Date: 2013-02-11 06:31:02
Author: igaztanaga
Date: 2013-02-11 06:31:02 EST (Mon, 11 Feb 2013)
New Revision: 82814
URL: http://svn.boost.org/trac/boost/changeset/82814
Log:
Cleanup unnecessary variables in erase(const_iterator)
Text files modified:
trunk/boost/container/vector.hpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
Modified: trunk/boost/container/vector.hpp
==============================================================================
--- trunk/boost/container/vector.hpp (original)
+++ trunk/boost/container/vector.hpp 2013-02-11 06:31:02 EST (Mon, 11 Feb 2013)
@@ -1261,10 +1261,9 @@
{
T *const pos = container_detail::to_raw_pointer(position.get_ptr());
T *const beg = container_detail::to_raw_pointer(this->members_.m_start);
- ::boost::move(pos + 1, beg + this->members_.m_size, pos);
+ //Move elements forward and destroy last
+ base_t::destroy(::boost::move(pos + 1, beg + this->members_.m_size, pos));
--this->members_.m_size;
- //Destroy last element
- base_t::destroy(container_detail::to_raw_pointer(this->members_.m_start) + this->members_.m_size);
return iterator(position.get_ptr());
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk