mirror of
https://github.com/nothings/stb.git
synced 2026-07-15 03:00:27 +00:00
Reverse allocation routines parameter order so that the context is at the back.
This commit is contained in:
@@ -30,7 +30,7 @@ public:
|
||||
void* memory;
|
||||
} g_context;
|
||||
|
||||
void* stbir_malloc(void* context, size_t size)
|
||||
void* stbir_malloc(size_t size, void* context)
|
||||
{
|
||||
if (!context)
|
||||
return malloc(size);
|
||||
@@ -42,7 +42,7 @@ void* stbir_malloc(void* context, size_t size)
|
||||
return real_context->memory;
|
||||
}
|
||||
|
||||
void stbir_free(void* context, void* memory)
|
||||
void stbir_free(void* memory, void* context)
|
||||
{
|
||||
if (!context)
|
||||
return free(memory);
|
||||
|
||||
Reference in New Issue
Block a user