engine: soundlib: super micro-optimization, reallocate buffer in Image_Copy rather than allocating and copying

This commit is contained in:
Alibek Omarov
2024-07-16 05:11:06 +03:00
parent a09084ceba
commit 09a7585643

View File

@@ -90,8 +90,8 @@ static byte *Sound_Copy( size_t size )
{
byte *out;
out = Mem_Malloc( host.soundpool, size );
memcpy( out, sound.tempbuffer, size );
out = Mem_Realloc( host.soundpool, sound.tempbuffer, size );
sound.tempbuffer = NULL;
return out;
}