mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-30 20:44:23 +01:00
const-guard a few functions
This commit is contained in:
parent
5b165e7d7b
commit
958c8909a4
4
IO/third_party/tga/targa.c
vendored
4
IO/third_party/tga/targa.c
vendored
@ -254,7 +254,7 @@ int targa_loadFromFile(Targa *targa, char *filename)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength)
|
||||
int targa_loadFromData(Targa *targa, const unsigned char *data, int dataLength)
|
||||
{
|
||||
short sNumber = 0;
|
||||
int ii = 0;
|
||||
@ -268,7 +268,7 @@ int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength)
|
||||
int rleId = 0;
|
||||
int pixel[4];
|
||||
unsigned char *imageId = NULL;
|
||||
unsigned char *ptr = NULL;
|
||||
const unsigned char *ptr = NULL;
|
||||
|
||||
if((targa == NULL) || (data == NULL) || (dataLength < 18)) {
|
||||
fprintf(stderr, "[%s():%i] error - invalid or missing argument(s).\n",
|
||||
|
2
IO/third_party/tga/targa.h
vendored
2
IO/third_party/tga/targa.h
vendored
@ -188,7 +188,7 @@ int targa_loadFromFile(Targa *targa, char *filename);
|
||||
*
|
||||
* @return An integer where zero is pass, less than zero is failure.
|
||||
*/
|
||||
int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength);
|
||||
int targa_loadFromData(Targa *targa, const unsigned char *data, int dataLength);
|
||||
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user