diff --git a/configure.ac b/configure.ac index 36b655ce..7f7b289f 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(rtorrent, 0.1.1, jaris@ifi.uio.no) +AC_INIT(rtorrent, 0.1.2, jaris@ifi.uio.no) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) @@ -39,7 +39,7 @@ TORRENT_CHECK_EXECINFO() TORRENT_CHECK_CURL() TORRENT_OTFD() -PKG_CHECK_MODULES(STUFF, sigc++-2.0 libtorrent >= 0.5.0, +PKG_CHECK_MODULES(STUFF, sigc++-2.0 libtorrent >= 0.5.1, CXXFLAGS="$CXXFLAGS $STUFF_CFLAGS $CURL_CFLAGS"; LIBS="$LIBS $STUFF_LIBS $CURL_LIBS") diff --git a/src/display/window_download_list.cc b/src/display/window_download_list.cc index 5ff2c26f..3c87d9f1 100644 --- a/src/display/window_download_list.cc +++ b/src/display/window_download_list.cc @@ -26,7 +26,7 @@ WindowDownloadList::redraw() { typedef std::pair Range; - Range range = utils::iterate_both_distance(m_list->begin(), + Range range = utils::advance_bidirectional(m_list->begin(), *m_focus != m_list->end() ? *m_focus : m_list->begin(), m_list->end(), m_canvas->get_height() / 3); diff --git a/src/display/window_file_list.cc b/src/display/window_file_list.cc index 8a906d67..061d1600 100644 --- a/src/display/window_file_list.cc +++ b/src/display/window_file_list.cc @@ -37,7 +37,7 @@ WindowFileList::redraw() { typedef std::pair Range; - Range range = utils::iterate_both_distance(0, *m_focus, m_download->get_download().get_entry_size(), + Range range = utils::advance_bidirectional(0, *m_focus, m_download->get_download().get_entry_size(), m_canvas->get_height()); while (range.first != range.second) { diff --git a/src/display/window_peer_list.cc b/src/display/window_peer_list.cc index d16c93ec..e5fa0b6d 100644 --- a/src/display/window_peer_list.cc +++ b/src/display/window_peer_list.cc @@ -42,7 +42,7 @@ WindowPeerList::redraw() { typedef std::pair Range; - Range range = utils::iterate_both_distance(m_list->begin(), + Range range = utils::advance_bidirectional(m_list->begin(), *m_focus != m_list->end() ? *m_focus : m_list->begin(), m_list->end(), m_canvas->get_height() - y); diff --git a/src/utils/algorithm.h b/src/utils/algorithm.h index a2202924..00bc76c0 100644 --- a/src/utils/algorithm.h +++ b/src/utils/algorithm.h @@ -11,7 +11,7 @@ for_each_pre(_InputIter __first, _InputIter __last, _Function __f) { _InputIter __tmp; while (__first != __last) { - __tmp = first++; + __tmp = __first++; __f(*__tmp); } @@ -23,7 +23,7 @@ for_each_pre(_InputIter __first, _InputIter __last, _Function __f) { // between __first and __last, centered on __middle1. template std::pair<_InputIter, _InputIter> -iterate_both_distance(_InputIter __first, _InputIter __middle1, _InputIter __last, _Distance __distance) { +advance_bidirectional(_InputIter __first, _InputIter __middle1, _InputIter __last, _Distance __distance) { _InputIter __middle2 = __middle1; do {