Remove useless void checks

This commit is contained in:
2026-05-26 19:24:17 -05:00
parent 1f2657cea0
commit 109318aeaf
16 changed files with 44 additions and 94 deletions
@@ -45,8 +45,6 @@ errorret_t entityOverworldDraw(
const componentid_t componentId,
void *user
) {
(void)componentId; (void)user;
componentid_t owCompId = entityGetComponent(entityId, COMPONENT_TYPE_OVERWORLD);
entityoverworld_t *ow = entityOverworldGet(entityId, owCompId);
@@ -16,8 +16,6 @@ void overworldGroundAdd(overworldground_t *ground) {
ground->posCompId = entityAddComponent(
ground->entityId, COMPONENT_TYPE_POSITION
);
(void)entityAddComponent(ground->entityId, COMPONENT_TYPE_RENDERABLE);
vec3 pos = { -OVERWORLD_GROUND_SIZE, 0.0f, -OVERWORLD_GROUND_SIZE };
vec3 scale = { OVERWORLD_GROUND_SIZE * 2.0f, 1.0f, OVERWORLD_GROUND_SIZE * 2.0f };
entityPositionSetLocalPosition(ground->entityId, ground->posCompId, pos);
+2 -2
View File
@@ -15,8 +15,8 @@
void overworldNpcAdd(overworldnpc_t *npc, vec3 position) {
npc->entityId = entityManagerAdd();
npc->posCompId = entityAddComponent(npc->entityId, COMPONENT_TYPE_POSITION);
(void)entityAddComponent(npc->entityId, COMPONENT_TYPE_RENDERABLE);
(void)entityAddComponent(npc->entityId, COMPONENT_TYPE_PHYSICS);
entityAddComponent(npc->entityId, COMPONENT_TYPE_RENDERABLE);
entityAddComponent(npc->entityId, COMPONENT_TYPE_PHYSICS);
npc->overworldCompId = entityAddComponent(npc->entityId, COMPONENT_TYPE_OVERWORLD);
npc->triggerCompId = entityAddComponent(npc->entityId, COMPONENT_TYPE_TRIGGER);
npc->interactableCompId = entityAddComponent(
+2 -2
View File
@@ -14,8 +14,8 @@
void overworldPlayerAdd(overworldplayer_t *player) {
player->entityId = entityManagerAdd();
player->posCompId = entityAddComponent(player->entityId, COMPONENT_TYPE_POSITION);
(void)entityAddComponent(player->entityId, COMPONENT_TYPE_RENDERABLE);
(void)entityAddComponent(player->entityId, COMPONENT_TYPE_PHYSICS);
entityAddComponent(player->entityId, COMPONENT_TYPE_RENDERABLE);
entityAddComponent(player->entityId, COMPONENT_TYPE_PHYSICS);
componentid_t owCompId = entityAddComponent(player->entityId, COMPONENT_TYPE_OVERWORLD);
entityOverworldSetType(player->entityId, owCompId, OVERWORLD_ENTITY_TYPE_PLAYER);
player->playerCompId = entityAddComponent(player->entityId, COMPONENT_TYPE_PLAYER);
+2 -3
View File
@@ -28,7 +28,6 @@ static void overworldSceneNpcInteract(
const componentid_t componentId,
void *user
) {
(void)entityId; (void)componentId; (void)user;
consolePrint("NPC interacted with!");
}
@@ -100,8 +99,8 @@ void overworldSceneInit(void) {
overworldSceneConfigureSprite(OVERWORLD.npc.entityId, COLOR_BLUE, NULL);
OVERWORLD.cameraEntityId = entityManagerAdd();
(void)entityAddComponent(OVERWORLD.cameraEntityId, COMPONENT_TYPE_POSITION);
(void)entityAddComponent(OVERWORLD.cameraEntityId, COMPONENT_TYPE_CAMERA);
entityAddComponent(OVERWORLD.cameraEntityId, COMPONENT_TYPE_POSITION);
entityAddComponent(OVERWORLD.cameraEntityId, COMPONENT_TYPE_CAMERA);
OVERWORLD.cameraOverworldCompId = entityAddComponent(
OVERWORLD.cameraEntityId, COMPONENT_TYPE_OVERWORLD_CAMERA
);
+2 -2
View File
@@ -22,7 +22,7 @@ static void testSceneSpawnTestEntity(void) {
entityid_t entity = entityManagerAdd();
componentid_t posComp = entityAddComponent(entity, COMPONENT_TYPE_POSITION);
(void)entityAddComponent(entity, COMPONENT_TYPE_RENDERABLE);
entityAddComponent(entity, COMPONENT_TYPE_RENDERABLE);
const int32_t cols = 20;
const float_t spacing = 1.5f;
@@ -76,7 +76,7 @@ void testSceneInit(void) {
cameraEntityId = entityManagerAdd();
cameraCompId = entityAddComponent(cameraEntityId, COMPONENT_TYPE_POSITION);
(void)entityAddComponent(cameraEntityId, COMPONENT_TYPE_CAMERA);
entityAddComponent(cameraEntityId, COMPONENT_TYPE_CAMERA);
vec3 eye, target, up;
glm_vec3_zero(target);
-1
View File
@@ -65,7 +65,6 @@ void uiTextboxBuildLayout(void) {
float_t contentW = UI_TEXTBOX.width - 2.0f * frameTileW;
float_t contentH = UI_TEXTBOX.height - 2.0f * frameTileH;
(void)contentH;
UI_TEXTBOX.charsPerLine = (int32_t)(contentW / fontW);
UI_TEXTBOX.linesPerPage = UI_TEXTBOX_LINES_PER_PAGE_MAX;