add const qualifiers on color puns
This commit is contained in:
parent
8846e788b2
commit
945b1d21fe
@ -114,7 +114,7 @@ static struct sprite_batch {
|
||||
.constant_colored = true,
|
||||
};
|
||||
|
||||
const uint32_t uniform_color = *(uint32_t *)&primitives[0].sprite.color;
|
||||
const uint32_t uniform_color = *(const uint32_t *)&primitives[0].sprite.color;
|
||||
|
||||
/* batch size is clamped so that reallocated short indices could be used */
|
||||
if (len >= QUAD_ELEMENT_BUFFER_LENGTH)
|
||||
@ -137,7 +137,7 @@ static struct sprite_batch {
|
||||
break;
|
||||
|
||||
/* if all are modulated the same we can skip sending the color data */
|
||||
if (batch.constant_colored && *(uint32_t *)¤t->sprite.color == uniform_color)
|
||||
if (batch.constant_colored && *(const uint32_t *)¤t->sprite.color == uniform_color)
|
||||
batch.constant_colored = false;
|
||||
|
||||
++batch.size;
|
||||
|
Loading…
Reference in New Issue
Block a user