Commit 044134eb authored by Max Kellermann's avatar Max Kellermann

pcm/PcmFormat: eliminate local variable "bits"

parent 9fa6fa52
......@@ -60,9 +60,7 @@ static void
ConvertFromFloat(typename Traits::pointer_type dest,
const float *src, size_t n)
{
constexpr auto bits = Traits::BITS;
const float factor = 1 << (bits - 1);
const float factor = 1 << (Traits::BITS - 1);
for (size_t i = 0; i != n; ++i) {
typename Traits::long_type sample(src[i] * factor);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment