diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-14 12:56:09 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-14 12:56:09 -0700 |
| commit | 9ff172d0ee65dfea6a8e329ab4363e2afa6dea49 (patch) | |
| tree | 8afcdfbc6ac58ecfaa40cfd76eca48f5a7ccfad0 /xdiff/xhistogram.c | |
| parent | 243a61d2cffe790ba811f5a7922a7e6a365b2922 (diff) | |
| parent | 8b9c5d2e3a38b6e0c2278fe10fe2a4bf34496a9d (diff) | |
| download | git-9ff172d0ee65dfea6a8e329ab4363e2afa6dea49.tar.gz | |
Merge branch 'en/xdiff-cleanup'
A lot of code clean-up of xdiff.
Split out of a larger topic.
* en/xdiff-cleanup:
xdiff: change type of xdfile_t.changed from char to bool
xdiff: add macros DISCARD(0), KEEP(1), INVESTIGATE(2) in xprepare.c
xdiff: rename rchg -> changed in xdfile_t
xdiff: delete chastore from xdfile_t
xdiff: delete fields ha, line, size in xdlclass_t in favor of an xrecord_t
xdiff: delete redundant array xdfile_t.ha
xdiff: delete struct diffdata_t
xdiff: delete local variables that alias fields in xrecord_t
xdiff: delete superfluous function xdl_get_rec() in xemit
xdiff: delete unnecessary fields from xrecord_t and xdfile_t
xdiff: delete local variables and initialize/free xdfile_t directly
xdiff: delete static forward declarations in xprepare
Diffstat (limited to 'xdiff/xhistogram.c')
| -rw-r--r-- | xdiff/xhistogram.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index 040d81e0bc..6dc450b1fe 100644 --- a/xdiff/xhistogram.c +++ b/xdiff/xhistogram.c @@ -86,7 +86,7 @@ struct region { ((LINE_MAP(index, ptr))->cnt) #define REC(env, s, l) \ - (env->xdf##s.recs[l - 1]) + (&env->xdf##s.recs[l - 1]) static int cmp_recs(xrecord_t *r1, xrecord_t *r2) { @@ -318,11 +318,11 @@ redo: if (!count1) { while(count2--) - env->xdf2.rchg[line2++ - 1] = 1; + env->xdf2.changed[line2++ - 1] = true; return 0; } else if (!count2) { while(count1--) - env->xdf1.rchg[line1++ - 1] = 1; + env->xdf1.changed[line1++ - 1] = true; return 0; } @@ -335,9 +335,9 @@ redo: else { if (lcs.begin1 == 0 && lcs.begin2 == 0) { while (count1--) - env->xdf1.rchg[line1++ - 1] = 1; + env->xdf1.changed[line1++ - 1] = true; while (count2--) - env->xdf2.rchg[line2++ - 1] = 1; + env->xdf2.changed[line2++ - 1] = true; result = 0; } else { result = histogram_diff(xpp, env, |
