From 7ea5946305f522031d21358ad0b701e2841aeed7 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 27 Dec 2017 10:54:11 +0100 Subject: [PATCH 1/2] remove some last lexical_cast residual --- bindings/python/src/torrent_handle.cpp | 1 - docs/building.rst | 2 +- src/string_util.cpp | 3 +-- test/bdecode_benchmark.cpp | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 4afe79a19..80c7eb52e 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -13,7 +13,6 @@ #include "libtorrent/announce_entry.hpp" #include #include -#include #include "gil.hpp" using namespace boost::python; diff --git a/docs/building.rst b/docs/building.rst index 686be6fcd..820eeabb8 100644 --- a/docs/building.rst +++ b/docs/building.rst @@ -410,7 +410,7 @@ unix/linux systems comes with these preinstalled. The prerequisites for building libtorrent are boost.system, boost.chrono and boost.random. Those are the *compiled* boost libraries needed. The headers-only libraries needed include (but is not necessarily limited to) boost.bind, -boost.ref, boost.multi_index, boost.optional, boost.lexical_cast, boost.integer, +boost.ref, boost.multi_index, boost.optional, boost.integer, boost.iterator, boost.tuple, boost.array, boost.function, boost.smart_ptr, boost.preprocessor, boost.static_assert. diff --git a/src/string_util.cpp b/src/string_util.cpp index 00d90be18..2458ec4d9 100644 --- a/src/string_util.cpp +++ b/src/string_util.cpp @@ -48,8 +48,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { - // lexical_cast's result depends on the locale. We need - // a well defined result + // We need well defined results that don't depend on locale boost::array::digits10> to_string(boost::int64_t n) { diff --git a/test/bdecode_benchmark.cpp b/test/bdecode_benchmark.cpp index f2195e082..7c14b516e 100644 --- a/test/bdecode_benchmark.cpp +++ b/test/bdecode_benchmark.cpp @@ -34,7 +34,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/bdecode.hpp" #include "libtorrent/bencode.hpp" #include "libtorrent/sha1_hash.hpp" -#include #include #include "test.hpp" From 69ff30f50f87139e6fb6cc66f43eb4573d069a76 Mon Sep 17 00:00:00 2001 From: arvidn Date: Wed, 27 Dec 2017 11:21:13 +0100 Subject: [PATCH 2/2] deprecate save_encryption_settings (they are part of the normal settings) --- ChangeLog | 1 + bindings/python/src/session.cpp | 2 +- include/libtorrent/session_handle.hpp | 7 +++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index bacb1605f..3d0f991e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,5 @@ + * deprecate save_encryption_settings (they are part of the normal settings) * add getters for peer_class_filter and peer_class_type_filter * make torrent_handler::set_priority() to use peer_classes * fix support for boost-1.66 (requires C++11) diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index 317ab03f0..a54ddeb69 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -1047,8 +1047,8 @@ void bind_session() .value("save_settings", lt::session::save_settings) .value("save_dht_settings", lt::session::save_dht_settings) .value("save_dht_state", lt::session::save_dht_state) - .value("save_encryption_settings", lt::session:: save_encryption_settings) #ifndef TORRENT_NO_DEPRECATE + .value("save_encryption_settings", lt::session:: save_encryption_settings) .value("save_as_map", lt::session::save_as_map) .value("save_i2p_proxy", lt::session::save_i2p_proxy) .value("save_proxy", lt::session::save_proxy) diff --git a/include/libtorrent/session_handle.hpp b/include/libtorrent/session_handle.hpp index 798d0e4d5..e11d28ff1 100644 --- a/include/libtorrent/session_handle.hpp +++ b/include/libtorrent/session_handle.hpp @@ -89,13 +89,12 @@ namespace libtorrent // saves dht state such as nodes and node-id, possibly accelerating // joining the DHT if provided at next session startup. - save_dht_state = 0x004, - - // save pe_settings - save_encryption_settings = 0x020 + save_dht_state = 0x004 #ifndef TORRENT_NO_DEPRECATE , + // save pe_settings + save_encryption_settings TORRENT_DEPRECATED_ENUM = 0x020, save_as_map TORRENT_DEPRECATED_ENUM = 0x040, // saves RSS feeds save_feeds TORRENT_DEPRECATED_ENUM = 0x080,