diff --git a/examples/client_test.cpp b/examples/client_test.cpp index ed9c08e58..3213c3881 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -328,7 +328,6 @@ typedef std::multimap handles_t; using boost::bind; using boost::filesystem::path; using boost::filesystem::exists; -using boost::filesystem::no_check; using boost::filesystem::directory_iterator; using boost::filesystem::extension; @@ -443,7 +442,10 @@ void scan_dir(path const& dir_path int main(int ac, char* av[]) { +#if BOOST_VERSION < 103400 + using boost::filesystem::no_check; path::default_name_check(no_check); +#endif int listen_port; float preferred_ratio; diff --git a/examples/dump_torrent.cpp b/examples/dump_torrent.cpp index 53d29c493..92ba663fe 100644 --- a/examples/dump_torrent.cpp +++ b/examples/dump_torrent.cpp @@ -49,8 +49,9 @@ int main(int argc, char* argv[]) std::cerr << "usage: dump_torrent torrent-file\n"; return 1; } - +#if BOOST_VERSION < 103400 boost::filesystem::path::default_name_check(boost::filesystem::no_check); +#endif try { diff --git a/examples/simple_client.cpp b/examples/simple_client.cpp index e769c2a12..fb4dfc0a0 100644 --- a/examples/simple_client.cpp +++ b/examples/simple_client.cpp @@ -45,9 +45,10 @@ POSSIBILITY OF SUCH DAMAGE. int main(int argc, char* argv[]) { using namespace libtorrent; - +#if BOOST_VERSION < 103400 namespace fs = boost::filesystem; fs::path::default_name_check(fs::no_check); +#endif if (argc != 2) { diff --git a/src/piece_picker.cpp b/src/piece_picker.cpp index 6244805b9..fcb016314 100755 --- a/src/piece_picker.cpp +++ b/src/piece_picker.cpp @@ -725,7 +725,8 @@ namespace libtorrent assert(m_piece_info[last_index].empty()); if (last_index >= cap_index) { - assert(m_piece_info[cap_index - 1].empty()); + assert(pushed_out_index == cap_index - 1 + || m_piece_info[cap_index - 1].empty()); m_piece_info[cap_index].swap(m_piece_info[cap_index - 2]); if (cap_index == pushed_out_index) pushed_out_index = cap_index - 2; diff --git a/src/session.cpp b/src/session.cpp index e2ccb3a84..405eff859 100755 --- a/src/session.cpp +++ b/src/session.cpp @@ -88,9 +88,11 @@ namespace libtorrent { filesystem_init::filesystem_init() { +#if BOOST_VERSION < 103400 using namespace boost::filesystem; if (path::default_name_check_writable()) path::default_name_check(no_check); +#endif } }