Skip to content

Commit

Permalink
refac(math): remove redundant ternary operator
Browse files Browse the repository at this point in the history
  • Loading branch information
chokobole committed Oct 25, 2024
1 parent dc5cfee commit 3d78d4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tachyon/math/base/semigroups.h
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ class MultiplicativeSemigroup {
size_t size, const G& generator, const G& c = G::One()) {
std::vector<MulResult> ret(size);
uint32_t log_size = base::bits::CheckedLog2(size);
MulResult pow = c.IsOne() ? G::One() : c;
MulResult pow = c;
for (size_t idx = 0; idx < size - 1; ++idx) {
ret[base::bits::ReverseBitsLen(idx, log_size)] = pow;
pow *= generator;
Expand Down

0 comments on commit 3d78d4f

Please sign in to comment.