From 82b599aa4b1901f84cb50b6a293d8ae91d8faf7e Mon Sep 17 00:00:00 2001 From: Steven Siloti Date: Sat, 30 Apr 2016 10:50:01 -0700 Subject: [PATCH] fix warning for signed/unsigned comparison --- include/libtorrent/aux_/session_settings.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/libtorrent/aux_/session_settings.hpp b/include/libtorrent/aux_/session_settings.hpp index 0a1152521..b4bd77d4d 100644 --- a/include/libtorrent/aux_/session_settings.hpp +++ b/include/libtorrent/aux_/session_settings.hpp @@ -77,8 +77,8 @@ namespace libtorrent { namespace aux { TORRENT_ASSERT((name & settings_pack::type_mask) == type); if ((name & settings_pack::type_mask) != type) return; - int const index = name & settings_pack::index_mask; - TORRENT_ASSERT(index >= 0 && index < N); + size_t const index = name & settings_pack::index_mask; + TORRENT_ASSERT(index < N); arr[index] = val; } @@ -88,8 +88,8 @@ namespace libtorrent { namespace aux static T empty; TORRENT_ASSERT((name & settings_pack::type_mask) == type); if ((name & settings_pack::type_mask) != type) return empty; - int const index = name & settings_pack::index_mask; - TORRENT_ASSERT(index >= 0 && index < N); + size_t const index = name & settings_pack::index_mask; + TORRENT_ASSERT(index < N); return arr[index]; }