Skip to content

Commit 06fffa0

Browse files
bmwillgitster
authored andcommitted
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>
1 parent b537e0b commit 06fffa0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

combine-diff.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,20 +162,20 @@ enum coalesce_direction { MATCH, BASE, NEW };
162162

163163
/* Coalesce new lines into base by finding LCS */
164164
static struct lline *coalesce_lines(struct lline *base, int *lenbase,
165-
struct lline *new, int lennew,
165+
struct lline *newline, int lennew,
166166
unsigned long parent, long flags)
167167
{
168168
int **lcs;
169169
enum coalesce_direction **directions;
170170
struct lline *baseend, *newend = NULL;
171171
int i, j, origbaselen = *lenbase;
172172

173-
if (new == NULL)
173+
if (newline == NULL)
174174
return base;
175175

176176
if (base == NULL) {
177177
*lenbase = lennew;
178-
return new;
178+
return newline;
179179
}
180180

181181
/*
@@ -200,7 +200,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
200200
directions[0][j] = NEW;
201201

202202
for (i = 1, baseend = base; i < origbaselen + 1; i++) {
203-
for (j = 1, newend = new; j < lennew + 1; j++) {
203+
for (j = 1, newend = newline; j < lennew + 1; j++) {
204204
if (match_string_spaces(baseend->line, baseend->len,
205205
newend->line, newend->len, flags)) {
206206
lcs[i][j] = lcs[i - 1][j - 1] + 1;
@@ -241,7 +241,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
241241
if (lline->prev)
242242
lline->prev->next = lline->next;
243243
else
244-
new = lline->next;
244+
newline = lline->next;
245245
if (lline->next)
246246
lline->next->prev = lline->prev;
247247

@@ -270,7 +270,7 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase,
270270
}
271271
}
272272

273-
newend = new;
273+
newend = newline;
274274
while (newend) {
275275
struct lline *lline = newend;
276276
newend = newend->next;

0 commit comments

Comments
 (0)