diff --git a/include/libtorrent/socket_io.hpp b/include/libtorrent/socket_io.hpp index 0568eeb8a..690e4827d 100644 --- a/include/libtorrent/socket_io.hpp +++ b/include/libtorrent/socket_io.hpp @@ -63,10 +63,10 @@ namespace detail { TORRENT_UNUSED(p); #if TORRENT_USE_IPV6 if (p == Proto::v6()) - return address_v6::bytes_type().size(); + return std::tuple_size::value; else #endif - return address_v4::bytes_type().size(); + return std::tuple_size::value; } template diff --git a/src/path.cpp b/src/path.cpp index f37313302..010bede09 100644 --- a/src/path.cpp +++ b/src/path.cpp @@ -684,7 +684,7 @@ namespace libtorrent { branch.assign(leaf.data(), leaf.size()); return; } - if (leaf.size() == 0) return; + if (leaf.empty()) return; #if defined(TORRENT_WINDOWS) || defined(TORRENT_OS2) #define TORRENT_SEPARATOR_CHAR '\\' @@ -910,4 +910,3 @@ namespace libtorrent { #endif } } -