pcm/PcmFormat: eliminate local variable "bits"

This commit is contained in:
Max Kellermann 2014-03-14 20:08:12 +01:00
parent 9fa6fa522e
commit 044134eba0

View File

@ -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);