diff options
author | David Robillard <d@drobilla.net> | 2025-02-10 19:33:14 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2025-02-10 19:33:14 -0500 |
commit | 16baeff5c2a48e32d6c176c912ca608160cb205c (patch) | |
tree | 955d283ca5092410a7b158a1c3ab5ece05e14252 /include | |
parent | ecd5449f7bcdb5097ed943088084bf71ab45bec6 (diff) | |
download | chilbert-16baeff5c2a48e32d6c176c912ca608160cb205c.tar.gz chilbert-16baeff5c2a48e32d6c176c912ca608160cb205c.tar.bz2 chilbert-16baeff5c2a48e32d6c176c912ca608160cb205c.zip |
Use std::max()
Diffstat (limited to 'include')
-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]; } } |