Remove evaluate_expression

evaluate_expression is just a little wrapper for a method on
expression.  Removing it also removes a lot of ugly (IMO) calls to
get().
This commit is contained in:
Tom Tromey
2023-04-28 07:24:59 -06:00
parent b785bb6d18
commit 43048e46db
18 changed files with 34 additions and 52 deletions

View File

@ -567,7 +567,7 @@ execute_control_command_1 (struct command_line *cmd, int from_tty)
/* Evaluate the expression. */
{
scoped_value_mark mark;
value *val = evaluate_expression (expr.get ());
value *val = expr->evaluate ();
cond_result = value_true (val);
}
@ -622,7 +622,7 @@ execute_control_command_1 (struct command_line *cmd, int from_tty)
/* Evaluate the conditional. */
{
scoped_value_mark mark;
value *val = evaluate_expression (expr.get ());
value *val = expr->evaluate ();
/* Choose which arm to take commands from based on the value
of the conditional expression. */