Skip to content

Commit

Permalink
head
Browse files Browse the repository at this point in the history
  • Loading branch information
bbbgan committed May 7, 2024
1 parent 81aafed commit 9946ace
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions iguana/reflection.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -809,9 +809,9 @@ constexpr inline auto get_offset_arr() {
constexpr auto type_options_arr =
get_type_options_arr<Tuple>(std::make_index_sequence<TupleSize>{});
std::array<size_t, TypeSize> res{};
int index = 0;
for (int i = 0; i < TupleSize; ++i) {
for (int j = 0; j < type_options_arr[i]; ++j) {
size_t index = 0;
for (size_t i = 0; i < TupleSize; ++i) {
for (size_t j = 0; j < type_options_arr[i]; ++j) {
res[index++] = j;
}
}
Expand All @@ -822,7 +822,7 @@ template <std::size_t N, typename T>
constexpr inline auto prefix_sum(const std::array<T, N> arr) {
std::array<T, N> presums{};
presums[0] = 0;
for (int i = 1; i < N; ++i) {
for (size_t i = 1; i < N; ++i) {
presums[i] = presums[i - 1] + arr[i];
}
return presums;
Expand Down

0 comments on commit 9946ace

Please sign in to comment.