Mercurial > public > mercurial-scm > hg
diff mercurial/thirdparty/xdiff/xdiffi.c @ 36823:49fe6249937a
xdiff: remove unused flags parameter
After D2683, the flags parameter in some functions is no longer needed.
Thus removed.
Differential Revision: https://phab.mercurial-scm.org/D2763
author | Jun Wu <quark@fb.com> |
---|---|
date | Fri, 09 Mar 2018 14:37:55 -0800 |
parents | 882657a9f768 |
children | f0d9811dda8e |
line wrap: on
line diff
--- a/mercurial/thirdparty/xdiff/xdiffi.c Fri Mar 09 14:24:27 2018 -0800 +++ b/mercurial/thirdparty/xdiff/xdiffi.c Fri Mar 09 14:37:55 2018 -0800 @@ -398,12 +398,11 @@ } -static int recs_match(xrecord_t *rec1, xrecord_t *rec2, int64_t flags) +static int recs_match(xrecord_t *rec1, xrecord_t *rec2) { return (rec1->ha == rec2->ha && xdl_recmatch(rec1->ptr, rec1->size, - rec2->ptr, rec2->size, - flags)); + rec2->ptr, rec2->size)); } /* @@ -762,10 +761,10 @@ * following group, expand this group to include it. Return 0 on success or -1 * if g cannot be slid down. */ -static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g, int64_t flags) +static int group_slide_down(xdfile_t *xdf, struct xdlgroup *g) { if (g->end < xdf->nrec && - recs_match(xdf->recs[g->start], xdf->recs[g->end], flags)) { + recs_match(xdf->recs[g->start], xdf->recs[g->end])) { xdf->rchg[g->start++] = 0; xdf->rchg[g->end++] = 1; @@ -783,10 +782,10 @@ * into a previous group, expand this group to include it. Return 0 on success * or -1 if g cannot be slid up. */ -static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g, int64_t flags) +static int group_slide_up(xdfile_t *xdf, struct xdlgroup *g) { if (g->start > 0 && - recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1], flags)) { + recs_match(xdf->recs[g->start - 1], xdf->recs[g->end - 1])) { xdf->rchg[--g->start] = 1; xdf->rchg[--g->end] = 0; @@ -847,7 +846,7 @@ end_matching_other = -1; /* Shift the group backward as much as possible: */ - while (!group_slide_up(xdf, &g, flags)) + while (!group_slide_up(xdf, &g)) if (group_previous(xdfo, &go)) xdl_bug("group sync broken sliding up"); @@ -862,7 +861,7 @@ /* Now shift the group forward as far as possible: */ while (1) { - if (group_slide_down(xdf, &g, flags)) + if (group_slide_down(xdf, &g)) break; if (group_next(xdfo, &go)) xdl_bug("group sync broken sliding down"); @@ -889,7 +888,7 @@ * that it can align with. */ while (go.end == go.start) { - if (group_slide_up(xdf, &g, flags)) + if (group_slide_up(xdf, &g)) xdl_bug("match disappeared"); if (group_previous(xdfo, &go)) xdl_bug("group sync broken sliding to match"); @@ -950,7 +949,7 @@ } while (g.end > best_shift) { - if (group_slide_up(xdf, &g, flags)) + if (group_slide_up(xdf, &g)) xdl_bug("best shift unreached"); if (group_previous(xdfo, &go)) xdl_bug("group sync broken sliding to blank line");