forked from premiere/premiere-libtorrent
warnings as errors
This commit is contained in:
parent
d8065b8941
commit
4873004df7
|
@ -46,11 +46,11 @@ install:
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- cd test
|
- cd test
|
||||||
- bjam --hash -j3 variant=$variant -l900 $CC
|
- bjam --hash -j3 warnings-as-errors=on variant=$variant -l900 $CC
|
||||||
- cd ../examples
|
- cd ../examples
|
||||||
- bjam --hash -j3 variant=$variant $CC
|
- bjam --hash -j3 warnings-as-errors=on variant=$variant $CC
|
||||||
- cd ../bindings/python
|
- cd ../bindings/python
|
||||||
- bjam --hash -j3 variant=$variant $CC stage_module
|
- bjam --hash -j3 warnings-as-errors=on variant=$variant $CC stage_module
|
||||||
- LD_LIBRARY_PATH=. python test.py
|
- LD_LIBRARY_PATH=. python test.py
|
||||||
- if [ $sim ]; then
|
- if [ $sim ]; then
|
||||||
cd ../../simulation;
|
cd ../../simulation;
|
||||||
|
|
|
@ -787,6 +787,7 @@ namespace libtorrent
|
||||||
bool has_piece_passed(int index) const
|
bool has_piece_passed(int index) const
|
||||||
{
|
{
|
||||||
if (!valid_metadata()) return false;
|
if (!valid_metadata()) return false;
|
||||||
|
if (index < 0 || index >= torrent_file().num_pieces()) return false;
|
||||||
if (!has_picker()) return m_have_all;
|
if (!has_picker()) return m_have_all;
|
||||||
return m_picker->has_piece_passed(index);
|
return m_picker->has_piece_passed(index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2293,7 +2293,8 @@ namespace libtorrent
|
||||||
bool peer_interested = bool(m_peer_interested);
|
bool peer_interested = bool(m_peer_interested);
|
||||||
t->alerts().emplace_alert<invalid_request_alert>(
|
t->alerts().emplace_alert<invalid_request_alert>(
|
||||||
t->get_handle(), m_remote, m_peer_id, r
|
t->get_handle(), m_remote, m_peer_id, r
|
||||||
, t->has_piece_passed(r.piece), peer_interested, false);
|
, t->has_piece_passed(r.piece)
|
||||||
|
, peer_interested, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// be lenient and pretend that the peer said it was interested
|
// be lenient and pretend that the peer said it was interested
|
||||||
|
|
Loading…
Reference in New Issue