cleared some variables in constructors and got rid of an unnecessary constructor
This commit is contained in:
parent
f7576714bf
commit
5f5ba94462
|
@ -73,7 +73,7 @@ namespace libtorrent
|
|||
|
||||
struct lru_file_entry
|
||||
{
|
||||
lru_file_entry(): last_use(time_now()) {}
|
||||
lru_file_entry(): key(0), last_use(time_now()), mode(0) {}
|
||||
mutable boost::intrusive_ptr<file> file_ptr;
|
||||
void* key;
|
||||
ptime last_use;
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace libtorrent
|
|||
// min value is 0, max value is 16775168
|
||||
struct ufloat16
|
||||
{
|
||||
ufloat16() {}
|
||||
ufloat16():m_val(0) {}
|
||||
ufloat16(int v)
|
||||
{ *this = v; }
|
||||
operator int()
|
||||
|
|
|
@ -125,6 +125,7 @@ namespace libtorrent
|
|||
m_in_constructor = false;
|
||||
m_encrypted_bytes = 0;
|
||||
#endif
|
||||
memset(m_reserved_bits, 0, sizeof(m_reserved_bits));
|
||||
}
|
||||
|
||||
bt_peer_connection::bt_peer_connection(
|
||||
|
@ -176,6 +177,7 @@ namespace libtorrent
|
|||
m_in_constructor = false;
|
||||
m_encrypted_bytes = 0;
|
||||
#endif
|
||||
memset(m_reserved_bits, 0, sizeof(m_reserved_bits));
|
||||
}
|
||||
|
||||
void bt_peer_connection::start()
|
||||
|
|
|
@ -1532,9 +1532,6 @@ namespace libtorrent
|
|||
}
|
||||
#endif // TORRENT_DEBUG
|
||||
|
||||
policy::peer::peer()
|
||||
{}
|
||||
|
||||
policy::peer::peer(boost::uint16_t port, bool conn, int src)
|
||||
: prev_amount_upload(0)
|
||||
, prev_amount_download(0)
|
||||
|
|
Loading…
Reference in New Issue