fix warning for signed/unsigned comparison
This commit is contained in:
parent
20b41ad0b9
commit
82b599aa4b
|
@ -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];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue