added swap to lazy entry

This commit is contained in:
Arvid Norberg 2008-05-14 05:16:40 +00:00
parent 262bb9f6e7
commit a954240aa9
1 changed files with 11 additions and 0 deletions

View File

@ -186,6 +186,17 @@ namespace libtorrent
// this entry has its bencoded data
std::pair<char const*, int> data_section() const;
void swap(lazy_entry& e)
{
using std::swap;
swap(m_type, e.m_type);
swap(m_data.start, e.m_data.start);
swap(m_size, e.m_size);
swap(m_capacity, e.m_capacity);
swap(m_begin, e.m_begin);
swap(m_end, e.m_end);
}
private:
entry_type_t m_type;