Replaced old casts with function calls

This commit is contained in:
_
2018-04-23 17:28:39 -07:00
parent 6d0b82682e
commit 046e1f8617
4 changed files with 9 additions and 11 deletions

View File

@@ -59,10 +59,10 @@ void writemesh(const struct MeshHeader *mh,
void extractmeshes(const char *filedata,
const char *filename,
unsigned int filesize) {
if (filedata == NULL || filesize <= 0) {
struct Header *h = NULL;
if (!(DEVIL1GEO.getheader(h, filedata))|| filesize <= 0) {
return;
}
struct Header *h = (struct Header*)filedata;
struct MeshHeader *mh = NULL;
struct Mesh m;
m.b = NULL;

View File

@@ -8,10 +8,9 @@ void extracttextures(const char *filedata,
struct Texture *t = NULL;
struct TextureBatchDescriptor *d = NULL;
char * fmt = NULL;
if (filedata == NULL || filesize == 0) {
if (!(DEVIL1TEX.getheader(p, filedata)) || filesize == 0) {
return;
}
p = (struct TexturePack*)filedata;
fmt = (char*)malloc(strlen(filename) + 3 + 4);
unsigned int i;
unsigned int j;