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:
Niklas Haas 2022-09-27 01:35:53 +02:00
parent 6b9b032d51
commit 1c8fdf6992
1 changed files with 1 additions and 1 deletions

View File

@ -753,7 +753,7 @@ static void info_callback(void *priv, const struct pl_render_info *info)
struct mp_pass_perf *perf = &frame->perf[index];
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]));
perf->count = pass->num_samples;
perf->last = pass->last;