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

@ -75,7 +75,7 @@ struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len
.textured = true,
};
const uint32_t uniform_color = *(const uint32_t *)&primitives[0].sprite.color;
const uint32_t uniform_color = *(const uint32_t *)(void const*)&primitives[0].sprite.color;
/* batch size is clamped so that reallocated short indices could be used */
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
@ -109,7 +109,7 @@ struct QuadBatch collect_sprite_batch(const Primitive2D primitives[], size_t len
}
/* if all are modulated the same we can skip sending the color data */
if (*(const uint32_t *)&current->sprite.color != uniform_color)
if (*(const uint32_t *)(void const *)&current->sprite.color != uniform_color)
batch.constant_colored = false;
++batch.size;
@ -132,7 +132,7 @@ void render_sprite_batch(const Primitive2D primitives[],
textures_get_dims(&ctx.texture_cache, primitives->sprite.texture_key);
/* cached srcrect */
Rect cached_srcrect;
Rect cached_srcrect = {0};
TextureKey cached_srcrect_key = TEXTURE_KEY_INVALID;
/* vertex population over a vertex buffer builder interface */