fix warnings
This commit is contained in:
@ -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 *)¤t->sprite.color != uniform_color)
|
||||
if (*(const uint32_t *)(void const *)¤t->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 */
|
||||
|
Reference in New Issue
Block a user