summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
authorBrandon Williams <bmwill@google.com>2018-02-14 18:59:36 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-02-22 18:08:05 (GMT)
commit06fffa000c3c3ab54f975474d5bb8d30dc914c03 (patch)
tree63c6dfc830a122e8c12bb419b6b5ea97830fc3ef /combine-diff.c
parentb537e0b1cfe9b1e52fad2623c8de0de40ab12beb (diff)
downloadgit-06fffa000c3c3ab54f975474d5bb8d30dc914c03.zip
git-06fffa000c3c3ab54f975474d5bb8d30dc914c03.tar.gz
git-06fffa000c3c3ab54f975474d5bb8d30dc914c03.tar.bz2
combine-diff: rename 'new' variables
Rename C++ keyword in order to bring the codebase closer to being able to be compiled with a C++ compiler. Signed-off-by: Brandon Williams <bmwill@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/combine-diff.c b/combine-diff.c
index bc08c4c..14db489 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -162,7 +162,7 @@ enum coalesce_direction { MATCH, BASE, NEW };
/* Coalesce new lines into base by finding LCS */
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
- struct lline *new, int lennew,
+ struct lline *newline, int lennew,
unsigned long parent, long flags)
{
int **lcs;
@@ -170,12 +170,12 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
struct lline *baseend, *newend = NULL;
int i, j, origbaselen = *lenbase;
- if (new == NULL)
+ if (newline == NULL)
return base;
if (base == NULL) {
*lenbase = lennew;
- return new;
+ return newline;
}
/*
@@ -200,7 +200,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
directions[0][j] = NEW;
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
- for (j = 1, newend = new; j < lennew + 1; j++) {
+ for (j = 1, newend = newline; j < lennew + 1; j++) {
if (match_string_spaces(baseend->line, baseend->len,
newend->line, newend->len, flags)) {
lcs[i][j] = lcs[i - 1][j - 1] + 1;
@@ -241,7 +241,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
if (lline->prev)
lline->prev->next = lline->next;
else
- new = lline->next;
+ newline = lline->next;
if (lline->next)
lline->next->prev = lline->prev;
@@ -270,7 +270,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
}
}
- newend = new;
+ newend = newline;
while (newend) {
struct lline *lline = newend;
newend = newend->next;