mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-08 03:02:30 +00:00
* Starting work on ElementText for displaying generic information.
* If a storage error was thrown from make_directory in EntryList::open, it would try to erase a FileMeta that wasn't inserted. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@753 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -162,11 +162,17 @@ VariableVoidSlot::get() {
|
||||
|
||||
void
|
||||
VariableVoidSlot::set(const torrent::Object& arg) {
|
||||
if (!m_slotSet.is_valid())
|
||||
return;
|
||||
|
||||
m_slotSet();
|
||||
}
|
||||
|
||||
const torrent::Object&
|
||||
VariableValueSlot::get() {
|
||||
if (!m_slotGet.is_valid())
|
||||
return m_cache;
|
||||
|
||||
m_cache = m_slotGet() / m_unit;
|
||||
|
||||
return m_cache;
|
||||
@@ -174,6 +180,9 @@ VariableValueSlot::get() {
|
||||
|
||||
void
|
||||
VariableValueSlot::set(const torrent::Object& arg) {
|
||||
if (!m_slotSet.is_valid())
|
||||
return;
|
||||
|
||||
value_type value;
|
||||
|
||||
switch (arg.type()) {
|
||||
@@ -196,6 +205,9 @@ VariableValueSlot::set(const torrent::Object& arg) {
|
||||
|
||||
const torrent::Object&
|
||||
VariableStringSlot::get() {
|
||||
if (!m_slotGet.is_valid())
|
||||
return m_cache;
|
||||
|
||||
m_cache = m_slotGet();
|
||||
|
||||
return m_cache;
|
||||
@@ -203,6 +215,9 @@ VariableStringSlot::get() {
|
||||
|
||||
void
|
||||
VariableStringSlot::set(const torrent::Object& arg) {
|
||||
if (!m_slotSet.is_valid())
|
||||
return;
|
||||
|
||||
switch (arg.type()) {
|
||||
case torrent::Object::TYPE_STRING:
|
||||
m_slotSet(arg.as_string());
|
||||
|
||||
Reference in New Issue
Block a user