diff --git a/include/QF/scene/scene.h b/include/QF/scene/scene.h index 9792e4f2e..dd96576fc 100644 --- a/include/QF/scene/scene.h +++ b/include/QF/scene/scene.h @@ -56,7 +56,7 @@ enum scene_components { scene_sw_frame, // animation frame scene_sw_brush, // brush model data pointer - scene_num_components + scene_comp_count }; typedef struct scene_s { diff --git a/include/QF/ui/text.h b/include/QF/ui/text.h index 1be136596..b898527b4 100644 --- a/include/QF/ui/text.h +++ b/include/QF/ui/text.h @@ -97,7 +97,7 @@ enum { // harfbuzz font features for the text object text_features, - text_type_count + text_comp_count }; typedef struct featureset_s DARRAY_TYPE (hb_feature_t) featureset_t; diff --git a/libs/scene/scene.c b/libs/scene/scene.c index 9e6736e28..7fe86f6ba 100644 --- a/libs/scene/scene.c +++ b/libs/scene/scene.c @@ -96,7 +96,7 @@ sw_null_brush (void *_brush) *brush = 0; } -static const component_t scene_components[] = { +static const component_t scene_components[scene_comp_count] = { [scene_href] = { .size = sizeof (hierref_t), .create = 0,//create_href, @@ -212,7 +212,7 @@ Scene_NewScene (void) scene_t *scene = calloc (1, sizeof (scene_t)); scene->reg = ECS_NewRegistry (); - ECS_RegisterComponents (scene->reg, scene_components, scene_num_components); + ECS_RegisterComponents (scene->reg, scene_components, scene_comp_count); scene_resources_t *res = calloc (1, sizeof (scene_resources_t)); *(scene_resources_t **)&scene->resources = res; diff --git a/libs/ui/text.c b/libs/ui/text.c index c9b256988..67a3e238b 100644 --- a/libs/ui/text.c +++ b/libs/ui/text.c @@ -57,7 +57,7 @@ text_features_destroy (void *_features) DARRAY_CLEAR (features); } -static const component_t text_components[text_type_count] = { +static const component_t text_components[text_comp_count] = { [text_href] = { .size = sizeof (hierref_t), .name = "href", @@ -91,7 +91,7 @@ void Text_Init (void) { text_reg = ECS_NewRegistry (); - ECS_RegisterComponents (text_reg, text_components, text_type_count); + ECS_RegisterComponents (text_reg, text_components, text_comp_count); } typedef struct glyphnode_s {