swapping correct vectors

This commit is contained in:
Dennis Luxen 2013-09-30 15:50:26 +02:00
parent ed208114be
commit 79e1c87a01

View File

@ -77,6 +77,7 @@ public:
{ } { }
void swap( SharedMemoryWrapper<DataT> & other ) { void swap( SharedMemoryWrapper<DataT> & other ) {
BOOST_ASSERT_MSG(m_size != 0 || other.size() != 0, "size invalid");
std::swap( m_size, other.m_size); std::swap( m_size, other.m_size);
std::swap( m_ptr , other.m_ptr ); std::swap( m_ptr , other.m_ptr );
} }