mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-26 14:27:14 +00:00
got rid of calls to close() since streams and archives clean after themselves
svn-id: r26051
This commit is contained in:
parent
c7ce7ec614
commit
cd366dd78c
@ -32,7 +32,6 @@ Disk::Disk(Parallaction* vm) : _vm(vm) {
|
||||
}
|
||||
|
||||
Disk::~Disk() {
|
||||
_archive.close();
|
||||
}
|
||||
|
||||
|
||||
@ -99,8 +98,6 @@ void Disk::loadExternalCnv(const char *filename, Cnv *cnv) {
|
||||
stream.read(cnv->_array[i], size);
|
||||
}
|
||||
|
||||
stream.close();
|
||||
|
||||
// printf("done\n");
|
||||
|
||||
|
||||
@ -129,8 +126,6 @@ void Disk::loadExternalStaticCnv(const char *filename, StaticCnv *cnv) {
|
||||
cnv->_data0 = (byte*)malloc(size);
|
||||
stream.read(cnv->_data0, size);
|
||||
|
||||
stream.close();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@ -170,8 +165,6 @@ void Disk::loadCnv(const char *filename, Cnv *cnv) {
|
||||
s += read;
|
||||
}
|
||||
|
||||
_archive.closeArchivedFile();
|
||||
|
||||
free(buf);
|
||||
|
||||
return;
|
||||
@ -220,8 +213,6 @@ Script* Disk::loadLocation(const char *name) {
|
||||
strcat(archivefile, name);
|
||||
strcat(archivefile, ".loc");
|
||||
|
||||
_archive.close();
|
||||
|
||||
_vm->_languageDir[2] = '\0';
|
||||
_archive.open(_vm->_languageDir);
|
||||
_vm->_languageDir[2] = '/';
|
||||
@ -324,7 +315,6 @@ void Disk::loadStatic(const char* name, StaticCnv* cnv) {
|
||||
cnv->_data0 = (byte*)malloc(size);
|
||||
|
||||
_archive.read(compressed, compressedsize);
|
||||
_archive.closeArchivedFile();
|
||||
|
||||
decompressChunk(compressed, cnv->_data0, size);
|
||||
free(compressed);
|
||||
@ -443,7 +433,6 @@ void Disk::loadScenery(const char *name, const char *mask) {
|
||||
}
|
||||
|
||||
void Disk::selectArchive(const char *name) {
|
||||
_archive.close();
|
||||
_archive.open(name);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user