summaryrefslogtreecommitdiff
path: root/src/session.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-12 22:16:38 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-13 01:03:48 -0400
commit536e3e73228b6168437704ede89499406b87391d (patch)
treeeb2193c64f8fb2253eb117eaf1870b52dd34ff1a /src/session.cc
parent6ef755c1330c6e11476ea2e63b8388ad29efb4ef (diff)
downloadfork-ledger-536e3e73228b6168437704ede89499406b87391d.tar.gz
fork-ledger-536e3e73228b6168437704ede89499406b87391d.tar.bz2
fork-ledger-536e3e73228b6168437704ede89499406b87391d.zip
Added a new scope_value() inline helper function
Diffstat (limited to 'src/session.cc')
-rw-r--r--src/session.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/session.cc b/src/session.cc
index 34cda5ef..b5441766 100644
--- a/src/session.cc
+++ b/src/session.cc
@@ -186,11 +186,9 @@ value_t session_t::fn_account(call_scope_t& scope)
{
interactive_t args(scope, "v");
if (scope[0].is_string())
- return value_t(static_cast<scope_t *>
- (journal->find_account(args.get<string>(0), false)));
+ return scope_value(journal->find_account(args.get<string>(0), false));
else if (scope[0].is_mask())
- return value_t(static_cast<scope_t *>
- (journal->find_account_re(args.get<mask_t>(0).str())));
+ return scope_value(journal->find_account_re(args.get<mask_t>(0).str()));
else
return NULL_VALUE;
}