merged changes from RC_1_0
This commit is contained in:
@@ -395,6 +395,13 @@ namespace libtorrent
|
||||
return e;
|
||||
}
|
||||
|
||||
lazy_entry const* lazy_entry::dict_find_dict(std::string const& name) const
|
||||
{
|
||||
lazy_entry const* e = dict_find(name);
|
||||
if (e == 0 || e->type() != lazy_entry::dict_t) return 0;
|
||||
return e;
|
||||
}
|
||||
|
||||
lazy_entry const* lazy_entry::dict_find_list(char const* name) const
|
||||
{
|
||||
lazy_entry const* e = dict_find(name);
|
||||
@@ -414,6 +421,19 @@ namespace libtorrent
|
||||
return 0;
|
||||
}
|
||||
|
||||
lazy_entry* lazy_entry::dict_find(std::string const& name)
|
||||
{
|
||||
TORRENT_ASSERT(m_type == dict_t);
|
||||
for (int i = 0; i < int(m_size); ++i)
|
||||
{
|
||||
lazy_dict_entry& e = m_data.dict[i+1];
|
||||
if (name.size() != e.val.m_begin - e.name) continue;
|
||||
if (std::equal(name.begin(), name.end(), e.name))
|
||||
return &e.val;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
lazy_entry* lazy_entry::list_append()
|
||||
{
|
||||
TORRENT_ASSERT(m_type == list_t);
|
||||
|
Reference in New Issue
Block a user