diff --git a/src/BlockView.h b/src/BlockView.h index 3a9ca2c..7b97c2a 100644 --- a/src/BlockView.h +++ b/src/BlockView.h @@ -83,8 +83,8 @@ template class BlockView { constexpr std::array Flatten() noexcept { std::array result; - for (int x = 0; x < N; x++) { - for (int y = 0; y < M; y++) { result[x + (N * y)] = start[(row_stride * y) + (pixel_stride * x)]; } + for (unsigned x = 0; x < N; x++) { + for (unsigned y = 0; y < M; y++) { result[x + (N * y)] = Get(x, y); } } return result; }