[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.241,1.242 simon.h,1.74,1.75

Travis Howell kirben at users.sourceforge.net
Sat Jun 14 22:20:01 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv12428/simon

Modified Files:
	simon.cpp simon.h 
Log Message:

Small cleanup
Fix small memory leak


Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.241
retrieving revision 1.242
diff -u -d -r1.241 -r1.242
--- simon.cpp	15 Jun 2003 05:04:17 -0000	1.241
+++ simon.cpp	15 Jun 2003 05:19:00 -0000	1.242
@@ -1140,10 +1140,6 @@
 	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 @@
 	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 @@
 }
 
 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) {

Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- simon.h	5 Jun 2003 12:20:05 -0000	1.74
+++ simon.h	15 Jun 2003 05:19:00 -0000	1.75
@@ -514,11 +514,9 @@
 
 	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();





More information about the Scummvm-git-logs mailing list