Small cleanup
Fix small memory leak svn-id: r8501
This commit is contained in:
parent
346e697f40
commit
16e5c50bad
2 changed files with 4 additions and 14 deletions
|
@ -1140,10 +1140,6 @@ File *SimonEngine::openTablesFile_gme(const char *filename) {
|
||||||
return _game_file;
|
return _game_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::closeTablesFile_gme(File *in) {
|
|
||||||
// not needed
|
|
||||||
}
|
|
||||||
|
|
||||||
uint SimonEngine::loadTextFile_simon1(const char *filename, byte *dst) {
|
uint SimonEngine::loadTextFile_simon1(const char *filename, byte *dst) {
|
||||||
File fo;
|
File fo;
|
||||||
fo.open(filename, _gameDataPath);
|
fo.open(filename, _gameDataPath);
|
||||||
|
@ -1169,10 +1165,6 @@ File *SimonEngine::openTablesFile_simon1(const char *filename) {
|
||||||
return fo;
|
return fo;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::closeTablesFile_simon1(File *in) {
|
|
||||||
in->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
|
uint SimonEngine::loadTextFile(const char *filename, byte *dst) {
|
||||||
if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
|
if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
|
||||||
return loadTextFile_simon1(filename, dst);
|
return loadTextFile_simon1(filename, dst);
|
||||||
|
@ -1188,10 +1180,10 @@ File *SimonEngine::openTablesFile(const char *filename) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::closeTablesFile(File *in) {
|
void SimonEngine::closeTablesFile(File *in) {
|
||||||
if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS)
|
if (_game & GF_AMIGAS || _game == GAME_SIMON1DEMO || _game == GAME_SIMON1DOS) {
|
||||||
closeTablesFile_simon1(in);
|
in->close();
|
||||||
else
|
delete in;
|
||||||
closeTablesFile_gme(in);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SimonEngine::addTimeEvent(uint timeout, uint subroutine_id) {
|
void SimonEngine::addTimeEvent(uint timeout, uint subroutine_id) {
|
||||||
|
|
|
@ -514,11 +514,9 @@ public:
|
||||||
|
|
||||||
uint loadTextFile_simon1(const char *filename, byte *dst);
|
uint loadTextFile_simon1(const char *filename, byte *dst);
|
||||||
File *openTablesFile_simon1(const char *filename);
|
File *openTablesFile_simon1(const char *filename);
|
||||||
void closeTablesFile_simon1(File *in);
|
|
||||||
|
|
||||||
uint loadTextFile_gme(const char *filename, byte *dst);
|
uint loadTextFile_gme(const char *filename, byte *dst);
|
||||||
File *openTablesFile_gme(const char *filename);
|
File *openTablesFile_gme(const char *filename);
|
||||||
void closeTablesFile_gme(File *in);
|
|
||||||
|
|
||||||
void invokeTimeEvent(TimeEvent *te);
|
void invokeTimeEvent(TimeEvent *te);
|
||||||
bool kickoffTimeEvents();
|
bool kickoffTimeEvents();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue