fix operator() ==, add const (#2063)
This commit is contained in:
parent
f3d319b677
commit
de369451b1
|
@ -199,7 +199,7 @@ namespace aux {
|
|||
void* get_storage() const { return storage.get(); }
|
||||
|
||||
bool operator==(cached_piece_entry const& rhs) const
|
||||
{ return storage.get() == rhs.storage.get() && piece == rhs.piece; }
|
||||
{ return piece == rhs.piece && storage.get() == rhs.storage.get(); }
|
||||
|
||||
// if this is set, we'll be calculating the hash
|
||||
// for this piece. This member stores the interim
|
||||
|
|
|
@ -124,7 +124,7 @@ namespace aux {
|
|||
// busy request at a time in each peer's queue
|
||||
std::uint32_t busy:1;
|
||||
|
||||
bool operator==(pending_block const& b)
|
||||
bool operator==(pending_block const& b) const
|
||||
{
|
||||
return b.block == block
|
||||
&& b.not_wanted == not_wanted
|
||||
|
|
|
@ -643,10 +643,10 @@ namespace libtorrent {
|
|||
* prio_factor + adjustment;
|
||||
}
|
||||
|
||||
bool operator!=(piece_pos p) const
|
||||
bool operator!=(piece_pos const& p) const
|
||||
{ return index != p.index || peer_count != p.peer_count; }
|
||||
|
||||
bool operator==(piece_pos p) const
|
||||
bool operator==(piece_pos const& p) const
|
||||
{ return index == p.index && peer_count == p.peer_count; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue