commit 94c371a38f6b4a7f2a781c85901846896071da44
parent 36618f1dcab41a6eb5c52c1b27a8ea95db785054
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Fri, 29 Jan 2021 10:18:39 +0100
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.
Diffstat:
1 file changed, 0 insertions(+), 3 deletions(-)
diff --git 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,