From a954240aa98dad7a44a077f5c33cc0e276f5a929 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Wed, 14 May 2008 05:16:40 +0000 Subject: [PATCH] added swap to lazy entry --- include/libtorrent/lazy_entry.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/libtorrent/lazy_entry.hpp b/include/libtorrent/lazy_entry.hpp index 7a8827887..29423ef64 100644 --- a/include/libtorrent/lazy_entry.hpp +++ b/include/libtorrent/lazy_entry.hpp @@ -186,6 +186,17 @@ namespace libtorrent // this entry has its bencoded data std::pair 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;