pcm/PcmFormat: use transform_n()

This commit is contained in:
Max Kellermann 2019-08-05 11:02:11 +02:00
parent a189a9e478
commit 91e565d92e
1 changed files with 2 additions and 2 deletions

View File

@ -23,6 +23,7 @@
#include "FloatConvert.hxx"
#include "ShiftConvert.hxx"
#include "util/ConstBuffer.hxx"
#include "util/TransformN.hxx"
#include "Dither.cxx" // including the .cxx file to get inlined templates
@ -38,8 +39,7 @@ struct PerSampleConvert : C {
void Convert(typename DstTraits::pointer_type gcc_restrict out,
typename SrcTraits::const_pointer_type gcc_restrict in,
size_t n) const {
for (size_t i = 0; i != n; ++i)
out[i] = C::Convert(in[i]);
transform_n(in, n, out, C::Convert);
}
};