fix cppcheck warnings
This commit is contained in:
parent
bb058aa081
commit
2b05b1c85c
|
@ -3496,8 +3496,7 @@ namespace libtorrent
|
|||
continue;
|
||||
}
|
||||
|
||||
cached_piece_entry* pe = m_disk_cache.find_piece(j);
|
||||
pe = m_disk_cache.add_dirty_block(j);
|
||||
cached_piece_entry* pe = m_disk_cache.add_dirty_block(j);
|
||||
|
||||
if (pe == NULL)
|
||||
{
|
||||
|
|
|
@ -862,9 +862,10 @@ namespace libtorrent
|
|||
if (on_parole()) ret |= piece_picker::on_parole
|
||||
| piece_picker::prioritize_partials;
|
||||
|
||||
// only one of rarest_first and sequential can be set.
|
||||
TORRENT_ASSERT((ret & piece_picker::rarest_first) ? 1 : 0
|
||||
+ (ret & piece_picker::sequential) ? 1 : 0 <= 1);
|
||||
// only one of rarest_first and sequential can be set. i.e. the sum of
|
||||
// whether the bit is set or not may only be 0 or 1 (never 2)
|
||||
TORRENT_ASSERT(((ret & piece_picker::rarest_first) ? 1 : 0)
|
||||
+ ((ret & piece_picker::sequential) ? 1 : 0) <= 1);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue