Skip to content

Commit

Permalink
Merge pull request #1007 from trcrsired/master
Browse files Browse the repository at this point in the history
fix up generate_pow_table by using range for loop
  • Loading branch information
trcrsired authored Dec 3, 2024
2 parents 2a1770f + 8cfb14f commit d4abd25
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions include/fast_io_core_impl/integers/sto/sto_contiguous.h
Original file line number Diff line number Diff line change
Expand Up @@ -514,14 +514,10 @@ template <char8_t base, my_unsigned_integral T, ::std::size_t n>
inline constexpr ::fast_io::freestanding::array<T, n> generate_pow_table() noexcept
{
::fast_io::freestanding::array<T, n> tmp;
if (n != 0)
{
tmp.front_unchecked() = 1;
}
T b{1};
for (::std::size_t i{1}; i < n; ++i)
for (auto &e : tmp)
{
tmp.index_unchecked(i) = b;
e = b;
b *= base;
}
return tmp;
Expand Down

0 comments on commit d4abd25

Please sign in to comment.