*** empty log message ***
This commit is contained in:
@@ -144,6 +144,8 @@ namespace libtorrent
|
||||
void operator=(const list_type&);
|
||||
void operator=(const integer_type&);
|
||||
|
||||
void sort();
|
||||
|
||||
integer_type& integer();
|
||||
const integer_type& integer() const;
|
||||
string_type& string();
|
||||
|
@@ -244,6 +244,18 @@ namespace libtorrent
|
||||
}
|
||||
}
|
||||
|
||||
void entry::sort()
|
||||
{
|
||||
using boost::bind;
|
||||
if (type() == dictionary_t)
|
||||
{
|
||||
std::stable_sort(dict().begin(), dict().end()
|
||||
, bind(std::less<std::string>()
|
||||
, bind(&entry::dictionary_type::value_type::first, _1)
|
||||
, bind(&entry::dictionary_type::value_type::first, _2)));
|
||||
}
|
||||
}
|
||||
|
||||
void entry::print(std::ostream& os, int indent) const
|
||||
{
|
||||
assert(indent >= 0);
|
||||
|
@@ -399,6 +399,7 @@ namespace libtorrent
|
||||
{
|
||||
path_e.list().push_back(*j);
|
||||
}
|
||||
file_e.sort();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -414,6 +415,9 @@ namespace libtorrent
|
||||
{
|
||||
p.append((char*)i->begin(), (char*)i->end());
|
||||
}
|
||||
|
||||
info.sort();
|
||||
|
||||
return info;
|
||||
}
|
||||
|
||||
@@ -448,6 +452,8 @@ namespace libtorrent
|
||||
|
||||
dict["info"] = create_info_metadata();
|
||||
|
||||
dict.sort();
|
||||
|
||||
return dict;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user