fixed build issues
This commit is contained in:
parent
de3db7e84e
commit
80fbe4d5ef
|
@ -48,14 +48,16 @@ namespace libtorrent
|
||||||
m_ptr = p.m_ptr ? new T(*p.m_ptr) : 0;
|
m_ptr = p.m_ptr ? new T(*p.m_ptr) : 0;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
T* operator->() { return m_ptr; }
|
||||||
|
T const* operator->() const { return m_ptr; }
|
||||||
T& operator*() { return *m_ptr; }
|
T& operator*() { return *m_ptr; }
|
||||||
|
T const& operator*() const { return *m_ptr; }
|
||||||
void swap(copy_ptr<T>& p)
|
void swap(copy_ptr<T>& p)
|
||||||
{
|
{
|
||||||
T* tmp = m_ptr;
|
T* tmp = m_ptr;
|
||||||
m_ptr = p.m_ptr;
|
m_ptr = p.m_ptr;
|
||||||
p.m_ptr = tmp;
|
p.m_ptr = tmp;
|
||||||
}
|
}
|
||||||
T const& operator*() const { return *m_ptr; }
|
|
||||||
operator bool() const { return m_ptr; }
|
operator bool() const { return m_ptr; }
|
||||||
~copy_ptr() { delete m_ptr; }
|
~copy_ptr() { delete m_ptr; }
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
{
|
{
|
||||||
file_storage::file_storage()
|
file_storage::file_storage()
|
||||||
: m_piece_length(0)
|
: m_total_size(0)
|
||||||
, m_total_size(0)
|
|
||||||
, m_num_pieces(0)
|
, m_num_pieces(0)
|
||||||
|
, m_piece_length(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
void file_storage::reserve(int num_files)
|
void file_storage::reserve(int num_files)
|
||||||
|
|
Loading…
Reference in New Issue