From 2922821e4fe3e3e9e496c50cd0c9aa1b1eecc967 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 29 Aug 2023 09:18:42 -0600 Subject: [PATCH] More renames in array_operation::evaluate array_operation::evaluate has variables named "tem2" and "tem3". This patch replaces one with a better name, and entirely removes the other. Reviewed-by: John Baldwin Approved-By: Simon Marchi --- gdb/eval.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gdb/eval.c b/gdb/eval.c index 7c955a4e9eb..81b7aa0cb99 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -2397,10 +2397,9 @@ array_operation::evaluate (struct type *expect_type, struct expression *exp, enum noside noside) { - int tem2 = std::get<0> (m_storage); - int tem3 = std::get<1> (m_storage); + const int provided_low_bound = std::get<0> (m_storage); const std::vector &in_args = std::get<2> (m_storage); - const int nargs = tem3 - tem2 + 1; + const int nargs = std::get<1> (m_storage) - provided_low_bound + 1; struct type *type = expect_type ? check_typedef (expect_type) : nullptr; if (expect_type != nullptr @@ -2515,7 +2514,7 @@ array_operation::evaluate (struct type *expect_type, objects. */ argvec[tem] = in_args[tem]->evaluate_with_coercion (exp, noside); } - return value_array (tem2, argvec); + return value_array (provided_low_bound, argvec); } value * -- 2.30.2