From 536e3e73228b6168437704ede89499406b87391d Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sat, 12 Jun 2010 22:16:38 -0400 Subject: Added a new scope_value() inline helper function --- src/account.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/account.cc') diff --git a/src/account.cc b/src/account.cc index 33b1ebab..606562b8 100644 --- a/src/account.cc +++ b/src/account.cc @@ -203,11 +203,9 @@ namespace { account_t * acct = account.parent; for (; acct && acct->parent; acct = acct->parent) ; if (scope[0].is_string()) - return value_t(static_cast - (acct->find_account(args.get(0), false))); + return scope_value(acct->find_account(args.get(0), false)); else if (scope[0].is_mask()) - return value_t(static_cast - (acct->find_account_re(args.get(0).str()))); + return scope_value(acct->find_account_re(args.get(0).str())); else return NULL_VALUE; } else { @@ -285,7 +283,7 @@ namespace { } value_t get_parent(account_t& account) { - return value_t(static_cast(account.parent)); + return scope_value(account.parent); } value_t fn_any(call_scope_t& scope) -- cgit v1.2.3