From a779751fc77a3e8703093737618d9778dd95e0ea Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Tue, 10 Nov 2009 02:43:52 -0500 Subject: query_t objects are now convertible to predicate_t --- src/query.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/query.h') diff --git a/src/query.h b/src/query.h index e64588ad..e3545396 100644 --- a/src/query.h +++ b/src/query.h @@ -254,11 +254,19 @@ public: : predicate_t(other) { TRACE_CTOR(query_t, "copy"); } - - query_t(const value_t& args, + query_t(const string& arg, const keep_details_t& _what_to_keep = keep_details_t()) : predicate_t(_what_to_keep) { TRACE_CTOR(query_t, "string, keep_details_t"); + if (! arg.empty()) { + value_t temp(string_value(arg)); + parse_args(temp.to_sequence()); + } + } + query_t(const value_t& args, + const keep_details_t& _what_to_keep = keep_details_t()) + : predicate_t(_what_to_keep) { + TRACE_CTOR(query_t, "value_t, keep_details_t"); if (! args.empty()) parse_args(args); } -- cgit v1.2.3