Nuke QFS_LoadStackFile().

It was used in only one place and is really not necessary (these days,
anyway).
This commit is contained in:
Bill Currie 2014-01-23 08:57:54 +09:00
parent 25a060f369
commit a561477274
3 changed files with 2 additions and 23 deletions

View File

@ -255,14 +255,6 @@ int QFS_FOpenFile (const char *filename, QFile **gzfile);
*/
byte *QFS_LoadFile (const char *path, int usehunk);
/** Load a file into memeory.
This is a wrapper for QFS_LoadFile().
\deprecated This should go away soon.
*/
byte *QFS_LoadStackFile (const char *path, void *buffer, int bufsize);
/** Load a file into memeory.
The file is loaded into memory allocated from the hunk.

View File

@ -1169,19 +1169,6 @@ QFS_LoadCacheFile (const char *path, struct cache_user_s *cu)
QFS_LoadFile (path, 3);
}
// uses temp hunk if larger than bufsize
VISIBLE byte *
QFS_LoadStackFile (const char *path, void *buffer, int bufsize)
{
byte *buf;
loadbuf = (byte *) buffer;
loadsize = bufsize;
buf = QFS_LoadFile (path, 4);
return buf;
}
/*
qfs_load_pakfile

View File

@ -285,15 +285,15 @@ SV_CalcPHS (void)
static unsigned int
SV_CheckModel (const char *mdl)
{
byte stackbuf[1024]; // avoid dirtying the cache heap
byte *buf;
unsigned short crc = 0;
// int len;
buf = (byte *) QFS_LoadStackFile (mdl, stackbuf, sizeof (stackbuf));
buf = (byte *) QFS_LoadFile (mdl, 0);
if (buf) {
crc = CRC_Block (buf, qfs_filesize);
free (buf);
} else {
SV_Printf ("WARNING: cannot generate checksum for %s\n", mdl);
}