aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2003-06-15 05:19:00 +0000
committerTravis Howell2003-06-15 05:19:00 +0000
commit16e5c50bad251132bca851ffb6f6c68c936d8336 (patch)
treeb639953d4d41a96554f36f9fa4f1a9afd0794c84
parent346e697f40c83d26b4037467b86e8a7726855b40 (diff)
downloadscummvm-rg350-16e5c50bad251132bca851ffb6f6c68c936d8336.tar.gz
scummvm-rg350-16e5c50bad251132bca851ffb6f6c68c936d8336.tar.bz2
scummvm-rg350-16e5c50bad251132bca851ffb6f6c68c936d8336.zip
Small cleanup
Fix small memory leak svn-id: r8501
-rw-r--r--simon/simon.cpp16
-rw-r--r--simon/simon.h2
2 files changed, 4 insertions, 14 deletions
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 2a28483acd..488a27fe10 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -1140,10 +1140,6 @@ File *SimonEngine::openTablesFile_gme(const char *filename) {
return _game_file;
}
-void SimonEngine::closeTablesFile_gme(File *in) {
- // not needed
-}
-
uint SimonEngine::loadTextFile_simon1(const char *filename, byte *dst) {
File fo;
fo.open(filename, _gameDataPath);
@@ -1169,10 +1165,6 @@ File *SimonEngine::openTablesFile_simon1(const char *filename) {
return fo;
}
-void SimonEngine::closeTablesFile_simon1(File *in) {
- in->close();
-}
-
uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
return loadTextFile_simon1(filename, dst);
@@ -1188,10 +1180,10 @@ File *SimonEngine::openTablesFile(const char *filename) {
}
void SimonEngine::closeTablesFile(File *in) {
- if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
- closeTablesFile_simon1(in);
- else
- closeTablesFile_gme(in);
+ if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
+ in->close();
+ delete in;
+ }
}
void SimonEngine::addTimeEvent(uint timeout, uint subroutine_id) {
diff --git a/simon/simon.h b/simon/simon.h
index 4a39602659..49ef7d3d57 100644
--- a/simon/simon.h
+++ b/simon/simon.h
@@ -514,11 +514,9 @@ public:
uint loadTextFile_simon1(const char *filename, byte *dst);
File *openTablesFile_simon1(const char *filename);
- void closeTablesFile_simon1(File *in);
uint loadTextFile_gme(const char *filename, byte *dst);
File *openTablesFile_gme(const char *filename);
- void closeTablesFile_gme(File *in);
void invokeTimeEvent(TimeEvent *te);
bool kickoffTimeEvents();