render: constified some local variables in SDL_AllocateRenderVertices.

This commit is contained in:
Ryan C. Gordon 2021-09-19 00:05:21 -04:00
parent 5faea84c63
commit 857cc7c0c9
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 3 additions and 3 deletions

View File

@ -287,10 +287,10 @@ void *
SDL_AllocateRenderVertices(SDL_Renderer *renderer, const size_t numbytes, const size_t alignment, size_t *offset)
{
const size_t needed = renderer->vertex_data_used + numbytes + alignment;
size_t current_offset = renderer->vertex_data_used;
const size_t current_offset = renderer->vertex_data_used;
size_t aligner = (alignment && ((current_offset & (alignment - 1)) != 0)) ? (alignment - (current_offset & (alignment - 1))) : 0;
size_t aligned = current_offset + aligner;
const size_t aligner = (alignment && ((current_offset & (alignment - 1)) != 0)) ? (alignment - (current_offset & (alignment - 1))) : 0;
const size_t aligned = current_offset + aligner;
if (renderer->vertex_data_allocation < needed) {
const size_t current_allocation = renderer->vertex_data ? renderer->vertex_data_allocation : 1024;