corrected missing const qualifiers on bdecode_node

This commit is contained in:
arvidn 2017-06-29 18:08:42 -04:00 committed by Arvid Norberg
parent 506950001d
commit 20c1407612
3 changed files with 5 additions and 4 deletions

View File

@ -1,3 +1,4 @@
* corrected missing const qualifiers on bdecode_node
* fix changing queue position of paused torrents (1.1.3 regression) * fix changing queue position of paused torrents (1.1.3 regression)
* fix re-check issue after move_storage * fix re-check issue after move_storage
* handle invalid arguments to set_piece_deadline() * handle invalid arguments to set_piece_deadline()

View File

@ -292,9 +292,9 @@ struct TORRENT_EXPORT bdecode_node
// size of the list. ``size()`` returns the size of the list. // size of the list. ``size()`` returns the size of the list.
bdecode_node list_at(int i) const; bdecode_node list_at(int i) const;
std::string list_string_value_at(int i 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 list_int_value_at(int i
, boost::int64_t default_val = 0); , boost::int64_t default_val = 0) const;
int list_size() const; int list_size() const;
// Functions with the ``dict_`` prefix operates on dictionaries. They are // Functions with the ``dict_`` prefix operates on dictionaries. They are

View File

@ -351,7 +351,7 @@ namespace libtorrent
} }
std::string bdecode_node::list_string_value_at(int i 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); bdecode_node n = list_at(i);
if (n.type() != bdecode_node::string_t) return default_val; 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 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); bdecode_node n = list_at(i);
if (n.type() != bdecode_node::int_t) return default_val; if (n.type() != bdecode_node::int_t) return default_val;