merged changes from RC_1_0
This commit is contained in:
parent
4e1e53f066
commit
b5a30a65ae
|
@ -241,11 +241,11 @@ namespace libtorrent
|
||||||
// integer
|
// integer
|
||||||
case 'i':
|
case 'i':
|
||||||
{
|
{
|
||||||
++in; // 'i'
|
++in; // 'i'
|
||||||
std::string val = read_until(in, end, 'e', err);
|
std::string val = read_until(in, end, 'e', err);
|
||||||
if (err) return;
|
if (err) return;
|
||||||
TORRENT_ASSERT(*in == 'e');
|
TORRENT_ASSERT(*in == 'e');
|
||||||
++in; // 'e'
|
++in; // 'e'
|
||||||
ret = entry(entry::int_t);
|
ret = entry(entry::int_t);
|
||||||
char* end_pointer;
|
char* end_pointer;
|
||||||
ret.integer() = strtoll(val.c_str(), &end_pointer, 10);
|
ret.integer() = strtoll(val.c_str(), &end_pointer, 10);
|
||||||
|
@ -304,7 +304,7 @@ namespace libtorrent
|
||||||
entry key;
|
entry key;
|
||||||
bdecode_recursive(in, end, key, err, depth + 1);
|
bdecode_recursive(in, end, key, err, depth + 1);
|
||||||
if (err || key.type() != entry::string_t)
|
if (err || key.type() != entry::string_t)
|
||||||
{
|
{
|
||||||
#ifdef TORRENT_DEBUG
|
#ifdef TORRENT_DEBUG
|
||||||
ret.m_type_queried = false;
|
ret.m_type_queried = false;
|
||||||
#endif
|
#endif
|
||||||
|
@ -375,7 +375,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// These functions will encode data to bencoded or decode bencoded data.
|
// These functions will encode data to bencoded or decode bencoded data.
|
||||||
//
|
//
|
||||||
// If possible, ``bdecode()`` producing a bdecode_node should be preferred
|
// If possible, ``bdecode()`` producing a bdecode_node should be preferred
|
||||||
|
|
|
@ -116,7 +116,7 @@ namespace libtorrent
|
||||||
if (i == dict().end()) return 0;
|
if (i == dict().end()) return 0;
|
||||||
return &i->second;
|
return &i->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
entry* entry::find_key(std::string const& key)
|
entry* entry::find_key(std::string const& key)
|
||||||
{
|
{
|
||||||
dictionary_type::iterator i = dict().find(key);
|
dictionary_type::iterator i = dict().find(key);
|
||||||
|
@ -130,7 +130,7 @@ namespace libtorrent
|
||||||
if (i == dict().end()) return 0;
|
if (i == dict().end()) return 0;
|
||||||
return &i->second;
|
return &i->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
const entry& entry::operator[](char const* key) const
|
const entry& entry::operator[](char const* key) const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue