From b0f06504fb428b7de0b39ee63da6d9f69f6f3c04 Mon Sep 17 00:00:00 2001 From: Jakob Petsovits Date: Thu, 16 Jul 2015 01:38:48 -0400 Subject: [PATCH] Avoid a clash of exported symbols, put them into anonymous namespaces. --- test/test_remap_files.cpp | 4 ++++ test/web_seed_suite.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/test/test_remap_files.cpp b/test/test_remap_files.cpp index 4a9c2a32a..cd1753a15 100644 --- a/test/test_remap_files.cpp +++ b/test/test_remap_files.cpp @@ -43,6 +43,8 @@ using namespace libtorrent; namespace lt = libtorrent; using boost::tuples::ignore; +namespace { + template boost::shared_ptr clone_ptr(boost::shared_ptr const& ptr) { @@ -59,6 +61,8 @@ bool on_alert(alert const* a) return false; } +} // anonymous namespace + void test_remap_files_gather(storage_mode_t storage_mode = storage_mode_sparse) { // in case the previous run was terminated diff --git a/test/web_seed_suite.cpp b/test/web_seed_suite.cpp index 66c7d52fa..55b967466 100644 --- a/test/web_seed_suite.cpp +++ b/test/web_seed_suite.cpp @@ -54,6 +54,8 @@ POSSIBILITY OF SUCH DAMAGE. using namespace libtorrent; namespace lt = libtorrent; +namespace { + int peer_disconnects = 0; bool on_alert(alert const* a) @@ -80,6 +82,8 @@ static sha1_hash file_hash(std::string const& name) */ static char const* proxy_name[] = {"", "_socks4", "_socks5", "_socks5_pw", "_http", "_http_pw", "_i2p"}; +} // anonymous namespace + // proxy: 0=none, 1=socks4, 2=socks5, 3=socks5_pw 4=http 5=http_pw void test_transfer(lt::session& ses, boost::shared_ptr torrent_file , int proxy, int port, char const* protocol, bool url_seed