From 1c8fdf6992eba7f7b3506c98ba79112ab071929e Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Tue, 27 Sep 2022 01:35:53 +0200 Subject: vo_gpu_next: use static assert for array size This is used in other places in the code, so it should be fine. --- video/out/vo_gpu_next.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'video/out') diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index 95c1987a7c..10a16a5f4f 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -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; -- cgit v1.2.3