From: Ben Pfaff Date: Sat, 4 Mar 2023 01:56:15 +0000 (-0800) Subject: case-map: Simplify case_map_stage_get_case_map(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69bd50b717021786aedf541394a150b72e4e9a7c;p=pspp case-map: Simplify case_map_stage_get_case_map(). A caseproto can't contain -1s anymore, so don't look for them. --- diff --git a/src/data/case-map.c b/src/data/case-map.c index 968b945af2..b340972c47 100644 --- a/src/data/case-map.c +++ b/src/data/case-map.c @@ -307,7 +307,6 @@ case_map_stage_get_case_map (const struct case_map_stage *stage) { struct case_map *map; size_t n_vars = dict_get_n_vars (stage->dict); - size_t n_values; size_t i; bool identity_map = true; @@ -329,10 +328,6 @@ case_map_stage_get_case_map (const struct case_map_stage *stage) return NULL; } - n_values = caseproto_get_n_widths (map->proto); - while (n_values > 0 && caseproto_get_width (map->proto, n_values - 1) == -1) - map->proto = caseproto_remove_widths (map->proto, --n_values, 1); - return map; }