fix deprecation of mmap_cache

This commit is contained in:
Arvid Norberg 2018-08-03 09:40:37 +02:00 committed by Arvid Norberg
parent a11bdecfcd
commit 6caddf6b8e
1 changed files with 3 additions and 1 deletions

View File

@ -95,8 +95,10 @@ namespace libtorrent {
#if TORRENT_ABI_VERSION == 1
#define DEPRECATED_SET(name, default_value, fun) { #name, fun, default_value }
#define DEPRECATED_SET_STR(name, default_value, fun) { #name, fun, default_value }
#else
#define DEPRECATED_SET(name, default_value, fun) { "", nullptr, 0 }
#define DEPRECATED_SET_STR(name, default_value, fun) { "", nullptr, nullptr }
#endif
#ifdef TORRENT_WINDOWS
@ -113,7 +115,7 @@ constexpr int CLOSE_FILE_INTERVAL = 0;
({{
SET(user_agent, "libtorrent/" LIBTORRENT_VERSION, &session_impl::update_user_agent),
SET(announce_ip, nullptr, nullptr),
SET(mmap_cache, nullptr, nullptr),
DEPRECATED_SET_STR(mmap_cache, nullptr, nullptr),
SET(handshake_client_version, nullptr, nullptr),
SET(outgoing_interfaces, "", &session_impl::update_outgoing_interfaces),
#if !TORRENT_USE_IPV6