some defensive programming. cleanup unused boost include. tighten up boost includes
This commit is contained in:
parent
91c622bec0
commit
adb3a5523c
5
Jamfile
5
Jamfile
|
@ -188,7 +188,10 @@ rule linking ( properties * )
|
|||
result += <library>/boost/date_time//boost_date_time/<link>shared ;
|
||||
}
|
||||
}
|
||||
result += <include>$(BOOST_ROOT) <define>BOOST_ALL_NO_LIB ;
|
||||
result += <include>$(BOOST_ROOT)
|
||||
<define>BOOST_ALL_NO_LIB
|
||||
<define>BOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||
;
|
||||
|
||||
}
|
||||
else
|
||||
|
|
|
@ -3958,11 +3958,17 @@ namespace libtorrent
|
|||
TORRENT_ASSERT(int(m_recv_buffer.size()) >= m_recv_pos);
|
||||
TORRENT_ASSERT(m_recv_pos >= size + offset);
|
||||
TORRENT_ASSERT(offset >= 0);
|
||||
TORRENT_ASSERT(size >= 0);
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
if (m_recv_pos - size - offset > 0)
|
||||
std::memmove(&m_recv_buffer[0] + offset, &m_recv_buffer[0] + offset + size, m_recv_pos - size - offset);
|
||||
m_recv_pos -= size;
|
||||
|
||||
// defensive. If this actually happens, we would have triggered
|
||||
// an assert already (if asserts are enabled).
|
||||
if (m_recv_pos < 0) m_recv_pos = 0;
|
||||
}
|
||||
|
||||
#ifdef TORRENT_DEBUG
|
||||
|
|
|
@ -30,7 +30,6 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
#include <cassert>
|
||||
#include <boost/timer.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
|
|
Loading…
Reference in New Issue