case-map: Identity map is only when there are no changes at all.
authorBen Pfaff <blp@cs.stanford.edu>
Sun, 5 Mar 2023 19:07:38 +0000 (11:07 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Sun, 5 Mar 2023 19:26:13 +0000 (11:26 -0800)
commit36bba0ffbec3b8432d4ececb720bf033053f5d46
treee17e4729eb7a1a01c467a68ab86c89b81c3e1c33
parent386de605e587854f3640b3998b5cc621f263272a
case-map: Identity map is only when there are no changes at all.

case_map_stage_get_case_map() called a mapping an identity map when no
data was reordered, which left the possibility that data was removed from
the end would be called an identity map.  This seems like a bad idea, so
this commit tightens the criteria.

This is a bigger than necessary change that also avoids per-variable
malloc()s that weren't really needed.

This might be a bug fix.  I haven't identified a particular bug that
it fixes.
src/data/case-map.c