mirror of https://github.com/axmolengine/axmol.git
Minor code cleanup
This commit is contained in:
parent
72bc0bf818
commit
f68521c4d0
|
@ -559,8 +559,6 @@ voidpf ZipFile_open_file_func(voidpf opaque, const char* filename, int mode)
|
||||||
|
|
||||||
voidpf ZipFile_opendisk_file_func(voidpf opaque, voidpf stream, uint32_t number_disk, int mode)
|
voidpf ZipFile_opendisk_file_func(voidpf opaque, voidpf stream, uint32_t number_disk, int mode)
|
||||||
{
|
{
|
||||||
voidpf ret = nullptr;
|
|
||||||
|
|
||||||
if (stream == nullptr)
|
if (stream == nullptr)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
|
@ -575,10 +573,10 @@ voidpf ZipFile_opendisk_file_func(voidpf opaque, voidpf stream, uint32_t number_
|
||||||
snprintf(&extensionBuffer[0], 5, ".z%02u", number_disk + 1);
|
snprintf(&extensionBuffer[0], 5, ".z%02u", number_disk + 1);
|
||||||
diskFilename.replace(pos, 4, extensionBuffer);
|
diskFilename.replace(pos, 4, extensionBuffer);
|
||||||
delete[] extensionBuffer;
|
delete[] extensionBuffer;
|
||||||
ret = ZipFile_open_file_func(opaque, diskFilename.c_str(), mode);
|
return ZipFile_open_file_func(opaque, diskFilename.c_str(), mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t ZipFile_read_file_func(voidpf opaque, voidpf stream, void* buf, uint32_t size)
|
uint32_t ZipFile_read_file_func(voidpf opaque, voidpf stream, void* buf, uint32_t size)
|
||||||
|
|
Loading…
Reference in New Issue