forked from premiere/premiere-libtorrent
rename bitfield::bytes() -> bitfiele::data()
This commit is contained in:
parent
ca581f2258
commit
095b709adb
2684
docs/todo.html
2684
docs/todo.html
File diff suppressed because one or more lines are too long
|
@ -69,7 +69,7 @@ namespace libtorrent
|
||||||
bitfield(char const* b, int bits): m_buf(NULL)
|
bitfield(char const* b, int bits): m_buf(NULL)
|
||||||
{ assign(b, bits); }
|
{ assign(b, bits); }
|
||||||
bitfield(bitfield const& rhs): m_buf(NULL)
|
bitfield(bitfield const& rhs): m_buf(NULL)
|
||||||
{ assign(rhs.bytes(), rhs.size()); }
|
{ assign(rhs.data(), rhs.size()); }
|
||||||
#if __cplusplus > 199711L
|
#if __cplusplus > 199711L
|
||||||
bitfield(bitfield&& rhs): m_buf(rhs.m_buf)
|
bitfield(bitfield&& rhs): m_buf(rhs.m_buf)
|
||||||
{ rhs.m_buf = NULL; }
|
{ rhs.m_buf = NULL; }
|
||||||
|
@ -157,13 +157,12 @@ namespace libtorrent
|
||||||
bool empty() const { return m_buf == NULL ? true : m_buf[-1] == 0; }
|
bool empty() const { return m_buf == NULL ? true : m_buf[-1] == 0; }
|
||||||
|
|
||||||
// returns a pointer to the internal buffer of the bitfield.
|
// returns a pointer to the internal buffer of the bitfield.
|
||||||
// TODO: rename to data() ?
|
char const* data() const { return reinterpret_cast<char const*>(m_buf); }
|
||||||
char const* bytes() const { return reinterpret_cast<char const*>(m_buf); }
|
|
||||||
|
|
||||||
// copy operator
|
// copy operator
|
||||||
bitfield& operator=(bitfield const& rhs)
|
bitfield& operator=(bitfield const& rhs)
|
||||||
{
|
{
|
||||||
assign(rhs.bytes(), rhs.size());
|
assign(rhs.data(), rhs.size());
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue