From 0a6ad4dcf4e5155bd4052e9dd72005a6f85366e1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sun, 17 May 2015 20:13:11 +0100 Subject: [PATCH] Only initialize element 1 in mirrored arrays. --- src/diff.hh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/diff.hh b/src/diff.hh index fe679bd6..adaa5cdd 100644 --- a/src/diff.hh +++ b/src/diff.hh @@ -14,8 +14,7 @@ struct MirroredArray : public ArrayView : ArrayView(data), size(size) { kak_assert(2 * size + 1 <= data.size()); - for (int i = -size; i <= size; ++i) - (*this)[i] = 0; + (*this)[1] = 0; } [[gnu::always_inline]]