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