mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 11:12:31 +00:00
* Make VariableMap handle both global and core::Download
variables. Variable now has functions for both void and core::Download*, where the core::Download* is discarded if necessary. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@847 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -44,6 +44,26 @@ namespace utils {
|
||||
|
||||
const torrent::Object Variable::m_emptyObject;
|
||||
|
||||
// Consider throwing an exception.
|
||||
const torrent::Object&
|
||||
Variable::get() {
|
||||
return m_emptyObject;
|
||||
}
|
||||
|
||||
void
|
||||
Variable::set(const torrent::Object& arg) {
|
||||
}
|
||||
|
||||
const torrent::Object&
|
||||
Variable::get_d(core::Download* download) {
|
||||
return get();
|
||||
}
|
||||
|
||||
void
|
||||
Variable::set_d(core::Download* download, const torrent::Object& arg) {
|
||||
set(arg);
|
||||
}
|
||||
|
||||
const char*
|
||||
Variable::string_to_value_unit(const char* pos, value_type* value, int base, int unit) {
|
||||
char* last;
|
||||
|
||||
Reference in New Issue
Block a user