forked from premiere/premiere-libtorrent
add move ctor to entry
This commit is contained in:
parent
ff0675e64e
commit
f0b92a2047
|
@ -136,6 +136,7 @@ namespace libtorrent
|
||||||
|
|
||||||
// hidden
|
// hidden
|
||||||
entry(entry const& e);
|
entry(entry const& e);
|
||||||
|
entry(entry&& e);
|
||||||
|
|
||||||
// hidden
|
// hidden
|
||||||
entry();
|
entry();
|
||||||
|
@ -154,6 +155,7 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
entry& operator=(bdecode_node const&);
|
entry& operator=(bdecode_node const&);
|
||||||
entry& operator=(entry const&);
|
entry& operator=(entry const&);
|
||||||
|
entry& operator=(entry&&);
|
||||||
entry& operator=(dictionary_type const&);
|
entry& operator=(dictionary_type const&);
|
||||||
entry& operator=(string_type const&);
|
entry& operator=(string_type const&);
|
||||||
entry& operator=(list_type const&);
|
entry& operator=(list_type const&);
|
||||||
|
|
|
@ -163,6 +163,12 @@ namespace libtorrent
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry& entry::operator=(entry&& e)
|
||||||
|
{
|
||||||
|
swap(e);
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
entry::integer_type& entry::integer()
|
entry::integer_type& entry::integer()
|
||||||
{
|
{
|
||||||
if (m_type == undefined_t) construct(int_t);
|
if (m_type == undefined_t) construct(int_t);
|
||||||
|
@ -281,6 +287,18 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
entry::entry(entry&& e)
|
||||||
|
: m_type(undefined_t)
|
||||||
|
{
|
||||||
|
#ifdef TORRENT_DEBUG
|
||||||
|
uint8_t type_queried = e.m_type_queried;
|
||||||
|
#endif
|
||||||
|
swap(e);
|
||||||
|
#ifdef TORRENT_DEBUG
|
||||||
|
m_type_queried = type_queried;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
entry::entry(dictionary_type const& v)
|
entry::entry(dictionary_type const& v)
|
||||||
: m_type(undefined_t)
|
: m_type(undefined_t)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue