Only initialize element 1 in mirrored arrays.

This commit is contained in:
Maxime Coste 2015-05-17 20:13:11 +01:00
parent cf7b64ba67
commit 0a6ad4dcf4

View File

@ -14,8 +14,7 @@ struct MirroredArray : public ArrayView<T>
: ArrayView<T>(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]]