From ea1642b3f969463a49e5a671478c92e4ef129665 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Jun 2010 05:02:14 -0400 Subject: Completely reworked argument passing in expressions --- src/option.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/option.h') 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(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(0)); } handler_thunk(args); -- cgit v1.2.3