fix warnings

This commit is contained in:
veclavtalica
2024-10-22 11:06:02 +03:00
parent eff2d9c5e1
commit 5a08c01208
3 changed files with 6 additions and 6 deletions

View File

@ -32,7 +32,7 @@ struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len)
.constant_colored = true,
};
const uint32_t uniform_color = *(const uint32_t *)&primitives[0].rect.color;
const uint32_t uniform_color = *(const uint32_t *)(void const *)&primitives[0].rect.color;
/* batch size is clamped so that reallocated short indices could be used */
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
@ -50,7 +50,7 @@ struct QuadBatch collect_rect_batch(const Primitive2D primitives[], size_t len)
break;
/* if all are modulated the same we can skip sending the color data */
if (*(const uint32_t *)&current->rect.color != uniform_color)
if (*(const uint32_t *)(void const *)&current->rect.color != uniform_color)
batch.constant_colored = false;
++batch.size;