diff --git a/ChangeLog b/ChangeLog index 591d6537e..98f8237de 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ + * corrected missing const qualifiers on bdecode_node * fix changing queue position of paused torrents (1.1.3 regression) * fix re-check issue after move_storage * handle invalid arguments to set_piece_deadline() diff --git a/include/libtorrent/bdecode.hpp b/include/libtorrent/bdecode.hpp index ba614cb9d..065335498 100644 --- a/include/libtorrent/bdecode.hpp +++ b/include/libtorrent/bdecode.hpp @@ -292,9 +292,9 @@ struct TORRENT_EXPORT bdecode_node // size of the list. ``size()`` returns the size of the list. bdecode_node list_at(int i) const; std::string list_string_value_at(int i - , char const* default_val = ""); + , char const* default_val = "") const; boost::int64_t list_int_value_at(int i - , boost::int64_t default_val = 0); + , boost::int64_t default_val = 0) const; int list_size() const; // Functions with the ``dict_`` prefix operates on dictionaries. They are diff --git a/src/bdecode.cpp b/src/bdecode.cpp index cd6fe914b..d428f3e4f 100644 --- a/src/bdecode.cpp +++ b/src/bdecode.cpp @@ -351,7 +351,7 @@ namespace libtorrent } std::string bdecode_node::list_string_value_at(int i - , char const* default_val) + , char const* default_val) const { bdecode_node n = list_at(i); if (n.type() != bdecode_node::string_t) return default_val; @@ -359,7 +359,7 @@ namespace libtorrent } boost::int64_t bdecode_node::list_int_value_at(int i - , boost::int64_t default_val) + , boost::int64_t default_val) const { bdecode_node n = list_at(i); if (n.type() != bdecode_node::int_t) return default_val;