Fixed options processing of --value-expr

This commit is contained in:
John Wiegley 2012-03-09 20:16:44 -06:00
parent 022059f2a8
commit 5e0efb5e8b
2 changed files with 7 additions and 4 deletions

View file

@ -112,8 +112,8 @@ std::size_t session_t::read_data(const string& master_account)
journal->checking_style = journal_t::CHECK_ERROR;
else if (HANDLED(strict))
journal->checking_style = journal_t::CHECK_WARNING;
else if (HANDLED(value_expr))
journal->value_expr = HANDLER(value_expr).str();
else if (HANDLED(value_expr_))
journal->value_expr = HANDLER(value_expr_).str();
#if defined(HAVE_BOOST_SERIALIZATION)
optional<archive_t> cache;
@ -345,6 +345,9 @@ option_t<session_t> * session_t::lookup_option(const char * p)
case 's':
OPT(strict);
break;
case 'v':
OPT(value_expr_);
break;
}
return NULL;
}

View file

@ -108,7 +108,7 @@ public:
HANDLER(price_db_).report(out);
HANDLER(price_exp_).report(out);
HANDLER(strict).report(out);
HANDLER(value_expr).report(out);
HANDLER(value_expr_).report(out);
}
option_t<session_t> * lookup_option(const char * p);
@ -156,7 +156,7 @@ public:
OPTION(session_t, permissive);
OPTION(session_t, price_db_);
OPTION(session_t, strict);
OPTION(session_t, value_expr);
OPTION(session_t, value_expr_);
};
/**