decoder/wavpack: use std::copy_n()
This commit is contained in:
parent
f5172e6b84
commit
d9c29a2c4f
@ -98,9 +98,7 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t count)
|
|||||||
static_assert(sizeof(*dst) <= sizeof(*src), "Wrong size");
|
static_assert(sizeof(*dst) <= sizeof(*src), "Wrong size");
|
||||||
|
|
||||||
/* pass through and align 8-bit samples */
|
/* pass through and align 8-bit samples */
|
||||||
while (count--) {
|
std::copy_n(src, count, dst);
|
||||||
*dst++ = *src++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2: {
|
case 2: {
|
||||||
@ -108,9 +106,7 @@ format_samples_int(int bytes_per_sample, void *buffer, uint32_t count)
|
|||||||
static_assert(sizeof(*dst) <= sizeof(*src), "Wrong size");
|
static_assert(sizeof(*dst) <= sizeof(*src), "Wrong size");
|
||||||
|
|
||||||
/* pass through and align 16-bit samples */
|
/* pass through and align 16-bit samples */
|
||||||
while (count--) {
|
std::copy_n(src, count, dst);
|
||||||
*dst++ = *src++;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user