diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:02:14 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-13 05:02:14 -0400 |
commit | ea1642b3f969463a49e5a671478c92e4ef129665 (patch) | |
tree | 9eba47b8708123b4e3f539dd9d747f1f85d9d2fe /src/option.h | |
parent | ad3b30a9641b8e09c38ea76e7011b614152d8faf (diff) | |
download | fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.tar.gz fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.tar.bz2 fork-ledger-ea1642b3f969463a49e5a671478c92e4ef129665.zip |
Completely reworked argument passing in expressions
Diffstat (limited to 'src/option.h')
-rw-r--r-- | src/option.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/option.h b/src/option.h index 91ff26f9..e2a4a839 100644 --- a/src/option.h +++ b/src/option.h @@ -167,7 +167,7 @@ public: throw_(std::runtime_error, _("To many arguments provided for %1") << desc()); else if (! args[0].is_string()) throw_(std::runtime_error, _("Context argument for %1 not a string") << desc()); - on_with(args[0].as_string(), args[1]); + on_with(args.get<string>(0), args[1]); } else if (args.size() < 1) { throw_(std::runtime_error, _("No argument provided for %1") << desc()); @@ -176,7 +176,7 @@ public: throw_(std::runtime_error, _("Context argument for %1 not a string") << desc()); } else { - on_only(args[0].as_string()); + on_only(args.get<string>(0)); } handler_thunk(args); |