Commit 15d20c42 authored by Morten Welinder's avatar Morten Welinder

expr: remove wrong, but dead, code.

Update copyright year.
parent 3e2f57c3
2018-01-01 Morten Welinder <terra@gnome.org>
* src/expr.c (gnm_expr_simplify_if): Remove non-working,
non-reachable code relating to true() and false() conditions.
2017-12-30 Morten Welinder <terra@gnome.org>
* src/expr.c (gnm_expr_top_get_array_corner): Remove. All callers
......
......@@ -543,7 +543,7 @@ dialog_about (WBCGtk *wbcg)
"website", PACKAGE_URL,
"website-label", _("Visit the Gnumeric website"),
"logo-icon-name", "gnumeric",
"copyright", _("Copyright \xc2\xa9 1998-2017"),
"copyright", _("Copyright \xc2\xa9 1998-2018"),
"comments", _("Free, Fast, Accurate - Pick Any Three!"),
NULL);
state->dialog = w;
......
......@@ -4,7 +4,7 @@
*
* Copyright (C) 2001-2006 Jody Goldberg (jody@gnome.org)
* Copyright (C) 1998-2000 Miguel de Icaza (miguel@gnu.org)
* Copyright (C) 2000-2009 Morten Welinder (terra@gnome.org)
* Copyright (C) 2000-2018 Morten Welinder (terra@gnome.org)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -1576,16 +1576,12 @@ gnm_expr_simplify_if (GnmExpr const *expr)
c = value_get_as_bool (condval, &err);
if (err)
return NULL;
} else if (GNM_EXPR_GET_OPER (cond) == GNM_EXPR_OP_FUNCALL) {
if (cond->func.func != gnm_func_lookup ("true", NULL))
c = TRUE;
else if (cond->func.func != gnm_func_lookup ("false", NULL))
c = FALSE;
else
return NULL;
} else
return NULL;
// We used to test for true() and false() as conditions too, but the code
// never worked and has been unreachable until now.
return gnm_expr_copy (expr->func.argv[c ? 1 : 2]);
}
......@@ -2890,7 +2886,7 @@ cb_get_ranges (GnmExpr const *expr, GnmExprWalk *data)
{
GSList **pranges = data->user;
/* There's no real reason to exclude ranges here, except that
/* There's no real reason to exclude names here, except that
we used to do so. */
if (GNM_EXPR_GET_OPER (expr) != GNM_EXPR_OP_NAME) {
GnmValue *v = gnm_expr_get_range (expr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment