mirror of
https://github.com/mpv-player/mpv
synced 2024-09-24 19:18:53 +02:00
vo_gpu_next: use static assert for array size
This is used in other places in the code, so it should be fine.
This commit is contained in:
parent
6b9b032d51
commit
1c8fdf6992
@ -753,7 +753,7 @@ static void info_callback(void *priv, const struct pl_render_info *info)
|
|||||||
|
|
||||||
struct mp_pass_perf *perf = &frame->perf[index];
|
struct mp_pass_perf *perf = &frame->perf[index];
|
||||||
const struct pl_dispatch_info *pass = info->pass;
|
const struct pl_dispatch_info *pass = info->pass;
|
||||||
assert(VO_PERF_SAMPLE_COUNT >= MP_ARRAY_SIZE(pass->samples));
|
static_assert(VO_PERF_SAMPLE_COUNT >= MP_ARRAY_SIZE(pass->samples), "");
|
||||||
memcpy(perf->samples, pass->samples, pass->num_samples * sizeof(pass->samples[0]));
|
memcpy(perf->samples, pass->samples, pass->num_samples * sizeof(pass->samples[0]));
|
||||||
perf->count = pass->num_samples;
|
perf->count = pass->num_samples;
|
||||||
perf->last = pass->last;
|
perf->last = pass->last;
|
||||||
|
Loading…
Reference in New Issue
Block a user