* Added a static_map implementation based on Josef's patches.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1136 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2010-03-01 07:45:54 +00:00
parent 6fe6dcd8d8
commit 806941b6c7
+6 -5
View File
@@ -85,11 +85,12 @@ struct view_downloads_filter : std::unary_function<Download*, bool> {
torrent::Object result = rpc::parse_command_single(rpc::make_target(d1), m_command);
switch (result.type()) {
case torrent::Object::TYPE_NONE: return false;
case torrent::Object::TYPE_VALUE: return result.as_value();
case torrent::Object::TYPE_STRING: return !result.as_string().empty();
case torrent::Object::TYPE_LIST: return !result.as_list().empty();
case torrent::Object::TYPE_MAP: return !result.as_map().empty();
// case torrent::Object::TYPE_RAW_BENCODE: return !result.as_raw_bencode().empty();
case torrent::Object::TYPE_VALUE: return result.as_value();
case torrent::Object::TYPE_STRING: return !result.as_string().empty();
case torrent::Object::TYPE_LIST: return !result.as_list().empty();
case torrent::Object::TYPE_MAP: return !result.as_map().empty();
default: return false;
}
// The default filter action is to return true, to not filter