Use custom vector swap.

This commit is contained in:
Bartosz Taudul 2019-03-26 23:02:39 +01:00
parent 6c5efbfdce
commit 2e6ac050f4

View File

@ -2633,7 +2633,7 @@ void Worker::ProcessZoneEnd( const QueueZoneEnd& ev )
Vector<ZoneEvent*> fitVec; Vector<ZoneEvent*> fitVec;
fitVec.reserve_exact( sz, m_slab ); fitVec.reserve_exact( sz, m_slab );
memcpy( fitVec.data(), childVec.data(), sz * sizeof( ZoneEvent* ) ); memcpy( fitVec.data(), childVec.data(), sz * sizeof( ZoneEvent* ) );
std::swap( fitVec, childVec ); fitVec.swap( childVec );
m_data.zoneVectorCache.push_back( std::move( fitVec ) ); m_data.zoneVectorCache.push_back( std::move( fitVec ) );
} }
} }