fix warnings
This commit is contained in:
@@ -10,17 +10,17 @@
|
|||||||
using namespace boost::python;
|
using namespace boost::python;
|
||||||
using namespace libtorrent;
|
using namespace libtorrent;
|
||||||
|
|
||||||
int get_last_active(peer_info const& pi)
|
boost::int64_t get_last_active(peer_info const& pi)
|
||||||
{
|
{
|
||||||
return total_seconds(pi.last_active);
|
return total_seconds(pi.last_active);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_last_request(peer_info const& pi)
|
boost::int64_t get_last_request(peer_info const& pi)
|
||||||
{
|
{
|
||||||
return total_seconds(pi.last_request);
|
return total_seconds(pi.last_request);
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_download_queue_time(peer_info const& pi)
|
boost::int64_t get_download_queue_time(peer_info const& pi)
|
||||||
{
|
{
|
||||||
return total_seconds(pi.download_queue_time);
|
return total_seconds(pi.download_queue_time);
|
||||||
}
|
}
|
||||||
|
@@ -138,7 +138,8 @@ namespace libtorrent
|
|||||||
void set_name(char const* n, bool borrow_string = false, int string_len = 0);
|
void set_name(char const* n, bool borrow_string = false, int string_len = 0);
|
||||||
std::string filename() const;
|
std::string filename() const;
|
||||||
char const* filename_ptr() const { return name; }
|
char const* filename_ptr() const { return name; }
|
||||||
int filename_len() const { return name_len == name_is_owned?strlen(name):name_len; }
|
int filename_len() const
|
||||||
|
{ return name_len == name_is_owned?int(strlen(name)):int(name_len); }
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
name_is_owned = (1<<12)-1,
|
name_is_owned = (1<<12)-1,
|
||||||
|
@@ -739,7 +739,7 @@ namespace libtorrent
|
|||||||
int seconds_since_last_scrape() const
|
int seconds_since_last_scrape() const
|
||||||
{
|
{
|
||||||
return m_last_scrape == (std::numeric_limits<boost::int16_t>::min)()
|
return m_last_scrape == (std::numeric_limits<boost::int16_t>::min)()
|
||||||
? -1 : m_ses.session_time() - m_last_scrape;
|
? -1 : int(m_ses.session_time() - m_last_scrape);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
|
Reference in New Issue
Block a user