diff options
Diffstat (limited to 'include/chilbert/chilbert.ipp')
-rw-r--r-- | include/chilbert/chilbert.ipp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/chilbert/chilbert.ipp b/include/chilbert/chilbert.ipp index bb178bc..8910129 100644 --- a/include/chilbert/chilbert.ipp +++ b/include/chilbert/chilbert.ipp @@ -292,9 +292,7 @@ coords_to_compact_index(const P& p, M = m = 0; for (size_t i = 0; i < n; ++i) { assert(num_bits(p[i]) >= ms[i]); - if (ms[i] > m) { - m = ms[i]; - } + m = std::max(ms[i], m); M += ms[i]; } } @@ -344,9 +342,7 @@ compact_index_to_coords(P& p, if (M == 0 || m == 0) { M = m = 0; for (size_t i = 0; i < n; ++i) { - if (ms[i] > m) { - m = ms[i]; - } + m = std::max(ms[i], m); M += ms[i]; } } |