summaryrefslogtreecommitdiff
path: root/src/report.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-10-31 03:34:32 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-10-31 04:07:33 -0400
commit4427016b1bc20fac4c1700e4f1577f6c7f9ab78c (patch)
tree26ad49d11ee95667aea74e3513b168c864a569c0 /src/report.cc
parent77c9d7b1ff9fc0033e653453e08d042b2e95692b (diff)
downloadledger-4427016b1bc20fac4c1700e4f1577f6c7f9ab78c.tar.gz
ledger-4427016b1bc20fac4c1700e4f1577f6c7f9ab78c.tar.bz2
ledger-4427016b1bc20fac4c1700e4f1577f6c7f9ab78c.zip
Improved arg checking for several valexpr functions
Diffstat (limited to 'src/report.cc')
-rw-r--r--src/report.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/report.cc b/src/report.cc
index 565597c6..096536c9 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -235,12 +235,13 @@ value_t report_t::fn_justify(call_scope_t& scope)
return string_value(out.str());
}
-value_t report_t::fn_quoted(call_scope_t& args)
+value_t report_t::fn_quoted(call_scope_t& scope)
{
+ interactive_t args(scope, "s");
std::ostringstream out;
out << '"';
- foreach (const char ch, args[0].to_string()) {
+ foreach (const char ch, args.get<string>(0)) {
if (ch == '"')
out << "\\\"";
else
@@ -253,8 +254,7 @@ value_t report_t::fn_quoted(call_scope_t& args)
value_t report_t::fn_join(call_scope_t& scope)
{
- interactive_t args(scope, "s");
-
+ interactive_t args(scope, "s");
std::ostringstream out;
foreach (const char ch, args.get<string>(0)) {