mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 11:35:05 +08:00
engine: soundlib: super micro-optimization, reallocate buffer in Image_Copy rather than allocating and copying
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user