Commit 91e565d9 authored by Max Kellermann's avatar Max Kellermann

pcm/PcmFormat: use transform_n()

parent a189a9e4
......@@ -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);
}
};
......
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