From 3d78d4f7e51ca9521fd8df46e77fe26a61dc0f41 Mon Sep 17 00:00:00 2001 From: Ryan Kim Date: Sat, 19 Oct 2024 21:05:40 +0900 Subject: [PATCH] refac(math): remove redundant ternary operator --- tachyon/math/base/semigroups.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tachyon/math/base/semigroups.h b/tachyon/math/base/semigroups.h index 795cb3d9d..e832865bb 100644 --- a/tachyon/math/base/semigroups.h +++ b/tachyon/math/base/semigroups.h @@ -250,7 +250,7 @@ class MultiplicativeSemigroup { size_t size, const G& generator, const G& c = G::One()) { std::vector 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;