From 94c371a38f6b4a7f2a781c85901846896071da44 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 29 Jan 2021 10:18:39 +0100 Subject: [PATCH] tweaks: don't bother initializing freshly allocated multidata After having been allocated, the multidata will get computed immediately, in precalc_multicolorinfo() and draw_row(), so first setting each element to -1 is a small waste of time. --- src/color.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/color.c b/src/color.c index 12417ccb..53f04481 100644 --- a/src/color.c +++ b/src/color.c @@ -235,9 +235,6 @@ void find_and_prime_applicable_syntax(void) void set_up_multicache(linestruct *line) { line->multidata = nmalloc(openfile->syntax->nmultis * sizeof(short)); - - for (short index = 0; index < openfile->syntax->nmultis; index++) - line->multidata[index] = -1; } /* Determine whether the matches of multiline regexes are still the same,