engine: make FS_CopyImage argument const

This commit is contained in:
Alibek Omarov
2025-11-22 13:11:41 +05:00
parent aae59ac281
commit 3fc59104f3
3 changed files with 6 additions and 5 deletions
+1 -1
View File
@@ -492,7 +492,7 @@ void Image_AddCmdFlags( uint flags );
void FS_FreeImage( rgbdata_t *pack );
rgbdata_t *FS_LoadImage( const char *filename, const byte *buffer, size_t size ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
qboolean FS_SaveImage( const char *filename, rgbdata_t *pix );
rgbdata_t *FS_CopyImage( rgbdata_t *in ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
rgbdata_t *FS_CopyImage( const rgbdata_t *in ) MALLOC_LIKE( FS_FreeImage, 1 ) WARN_UNUSED_RESULT;
extern const bpc_desc_t PFDesc[]; // image get pixelformat
qboolean Image_Process( rgbdata_t **pix, int width, int height, uint flags, float reserved );
void Image_PaletteHueReplace( byte *palSrc, int newHue, int start, int end, int pal_size );
+4 -3
View File
@@ -597,14 +597,15 @@ FS_CopyImage
make an image copy
================
*/
rgbdata_t *FS_CopyImage( rgbdata_t *in )
rgbdata_t *FS_CopyImage( const rgbdata_t *in )
{
rgbdata_t *out;
int palSize = 0;
if( !in ) return NULL;
if( !in )
return NULL;
out = Mem_Malloc( host.imagepool, sizeof( rgbdata_t ));
out = Mem_Malloc( host.imagepool, sizeof( *out ));
*out = *in;
switch( in->type )