const-guard a few functions

This commit is contained in:
Pavel Krajcevski 2013-11-19 14:20:37 -05:00
parent 5b165e7d7b
commit 958c8909a4
2 changed files with 3 additions and 3 deletions

View file

@ -254,7 +254,7 @@ int targa_loadFromFile(Targa *targa, char *filename)
return rc; 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; short sNumber = 0;
int ii = 0; int ii = 0;
@ -268,7 +268,7 @@ int targa_loadFromData(Targa *targa, unsigned char *data, int dataLength)
int rleId = 0; int rleId = 0;
int pixel[4]; int pixel[4];
unsigned char *imageId = NULL; unsigned char *imageId = NULL;
unsigned char *ptr = NULL; const unsigned char *ptr = NULL;
if((targa == NULL) || (data == NULL) || (dataLength < 18)) { if((targa == NULL) || (data == NULL) || (dataLength < 18)) {
fprintf(stderr, "[%s():%i] error - invalid or missing argument(s).\n", fprintf(stderr, "[%s():%i] error - invalid or missing argument(s).\n",

View file

@ -188,7 +188,7 @@ int targa_loadFromFile(Targa *targa, char *filename);
* *
* @return An integer where zero is pass, less than zero is failure. * @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);
/** /**