fixed some msvc warnings

This commit is contained in:
Arvid Norberg 2010-12-19 09:50:58 +00:00
parent 650f02eba7
commit 491b876329
3 changed files with 4 additions and 4 deletions

View File

@ -97,7 +97,7 @@ namespace libtorrent
for (std::string::const_iterator i = val.begin()
, end(val.end()); i != end; ++i)
*out++ = *i;
return val.length();
return int(val.length());
}
TORRENT_EXPORT char const* integer_to_str(char* buf, int size, entry::integer_type val);

View File

@ -88,7 +88,7 @@ namespace detail
Addr plus_one(Addr const& a)
{
Addr tmp(a);
for (int i = tmp.size() - 1; i >= 0; --i)
for (int i = int(tmp.size()) - 1; i >= 0; --i)
{
if (tmp[i] < (std::numeric_limits<typename Addr::value_type>::max)())
{
@ -106,7 +106,7 @@ namespace detail
Addr minus_one(Addr const& a)
{
Addr tmp(a);
for (int i = tmp.size() - 1; i >= 0; --i)
for (int i = int(tmp.size()) - 1; i >= 0; --i)
{
if (tmp[i] > 0)
{

View File

@ -314,7 +314,7 @@ public:
return 0;
}
#ifdef TORRENT_DEBUG
int buf_size = 0;
size_t buf_size = 0;
#endif
for (typename Mutable_Buffers::const_iterator i = buffers.begin()