fix warning for signed/unsigned comparison

This commit is contained in:
Steven Siloti 2016-04-30 10:50:01 -07:00
parent 20b41ad0b9
commit 82b599aa4b
1 changed files with 4 additions and 4 deletions

View File

@ -77,8 +77,8 @@ namespace libtorrent { namespace aux
{ {
TORRENT_ASSERT((name & settings_pack::type_mask) == type); TORRENT_ASSERT((name & settings_pack::type_mask) == type);
if ((name & settings_pack::type_mask) != type) return; if ((name & settings_pack::type_mask) != type) return;
int const index = name & settings_pack::index_mask; size_t const index = name & settings_pack::index_mask;
TORRENT_ASSERT(index >= 0 && index < N); TORRENT_ASSERT(index < N);
arr[index] = val; arr[index] = val;
} }
@ -88,8 +88,8 @@ namespace libtorrent { namespace aux
static T empty; static T empty;
TORRENT_ASSERT((name & settings_pack::type_mask) == type); TORRENT_ASSERT((name & settings_pack::type_mask) == type);
if ((name & settings_pack::type_mask) != type) return empty; if ((name & settings_pack::type_mask) != type) return empty;
int const index = name & settings_pack::index_mask; size_t const index = name & settings_pack::index_mask;
TORRENT_ASSERT(index >= 0 && index < N); TORRENT_ASSERT(index < N);
return arr[index]; return arr[index];
} }