diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/uhjencoder.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/utils/uhjencoder.cpp b/utils/uhjencoder.cpp index 34698993..c381d1b9 100644 --- a/utils/uhjencoder.cpp +++ b/utils/uhjencoder.cpp @@ -502,11 +502,9 @@ int main(int argc, char **argv) got -= LeadIn; for(size_t c{0};c < uhjchans;++c) { - constexpr float max_val{8388607.0f / 8388608.0f}; - auto clamp = [](float v, float mn, float mx) noexcept - { return std::min(std::max(v, mn), mx); }; + static constexpr float max_val{8388607.0f / 8388608.0f}; for(size_t i{0};i < got;++i) - outmem[i*uhjchans + c] = clamp(encmem[c][LeadIn+i], -1.0f, max_val); + outmem[i*uhjchans + c] = std::clamp(encmem[c][LeadIn+i], -1.0f, max_val); } LeadIn = 0; |