[client] Make the hud update function type explicit

This commit is contained in:
Bill Currie 2022-11-04 11:10:56 +09:00
parent 99e12872e5
commit 5f01dc9fb5
2 changed files with 5 additions and 1 deletions

View file

@ -28,6 +28,8 @@
#ifndef __client_hud_h
#define __client_hud_h
struct view_s;
enum {
hud_href,
hud_update,
@ -43,6 +45,8 @@ enum {
hud_comp_count
};
typedef void (*hud_update_f) (struct view_s);
typedef struct hud_subpic_s {
struct qpic_s *pic;
uint32_t x, y;

View file

@ -278,7 +278,7 @@ draw_update (ecs_pool_t *pool)
{
uint32_t count = pool->count;
uint32_t *ent = pool->dense;
void (**func) (view_t) = pool->data;
hud_update_f *func = pool->data;
while (count-- > 0) {
view_t view = { .id = *ent++, .reg = hud_registry };
(*func++) (view);