[Scummvm-cvs-logs] SF.net SVN: scummvm:[50924] scummvm/trunk/engines/tinsel
eriktorbjorn at users.sourceforge.net
eriktorbjorn at users.sourceforge.net
Fri Jul 16 05:14:03 CEST 2010
Revision: 50924
http://scummvm.svn.sourceforge.net/scummvm/?rev=50924&view=rev
Author: eriktorbjorn
Date: 2010-07-16 03:14:03 +0000 (Fri, 16 Jul 2010)
Log Message:
-----------
Cleanup.
Modified Paths:
--------------
scummvm/trunk/engines/tinsel/actors.cpp
scummvm/trunk/engines/tinsel/bmv.cpp
scummvm/trunk/engines/tinsel/handle.cpp
scummvm/trunk/engines/tinsel/object.cpp
scummvm/trunk/engines/tinsel/savescn.cpp
scummvm/trunk/engines/tinsel/strres.cpp
Modified: scummvm/trunk/engines/tinsel/actors.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/actors.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/actors.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -197,10 +197,8 @@
}
void FreeActors() {
- if (actorInfo) {
- free(actorInfo);
- actorInfo = NULL;
- }
+ free(actorInfo);
+ actorInfo = NULL;
}
/**
Modified: scummvm/trunk/engines/tinsel/bmv.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/bmv.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/bmv.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -730,16 +730,12 @@
stream.close();
// Release the data buffer
- if (bigBuffer != NULL) {
- free(bigBuffer);
- bigBuffer = NULL;
- }
+ free(bigBuffer);
+ bigBuffer = NULL;
// Release the screen buffer
- if (screenBuffer != NULL) {
- free(screenBuffer);
- screenBuffer = NULL;
- }
+ free(screenBuffer);
+ screenBuffer = NULL;
// Ditch any text objects
for (i = 0; i < 2; i++) {
Modified: scummvm/trunk/engines/tinsel/handle.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/handle.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/handle.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -175,22 +175,18 @@
}
void FreeHandleTable() {
- if (handleTable) {
- free(handleTable);
- handleTable = NULL;
- }
- if (cdGraphStream) {
- delete cdGraphStream;
- cdGraphStream = 0;
- }
+ free(handleTable);
+ handleTable = NULL;
+
+ delete cdGraphStream;
+ cdGraphStream = NULL;
}
/**
* Loads a memory block as a file.
*/
void OpenCDGraphFile() {
- if (cdGraphStream)
- delete cdGraphStream;
+ delete cdGraphStream;
// As the theory goes, the right CD will be in there!
Modified: scummvm/trunk/engines/tinsel/object.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/object.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/object.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -49,10 +49,8 @@
#endif
void FreeObjectList() {
- if (objectList) {
- free(objectList);
- objectList = NULL;
- }
+ free(objectList);
+ objectList = NULL;
}
/**
Modified: scummvm/trunk/engines/tinsel/savescn.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/savescn.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/savescn.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -162,10 +162,8 @@
}
void FreeSaveScenes() {
- if (ssData) {
- free(ssData);
- ssData = NULL;
- }
+ free(ssData);
+ ssData = NULL;
}
/**
Modified: scummvm/trunk/engines/tinsel/strres.cpp
===================================================================
--- scummvm/trunk/engines/tinsel/strres.cpp 2010-07-16 03:07:30 UTC (rev 50923)
+++ scummvm/trunk/engines/tinsel/strres.cpp 2010-07-16 03:14:03 UTC (rev 50924)
@@ -88,11 +88,9 @@
textLanguage = newLang;
sampleLanguage = newLang;
- if (textBuffer) {
- // free the previous buffer
- free(textBuffer);
- textBuffer = NULL;
- }
+ // free the previous buffer
+ free(textBuffer);
+ textBuffer = NULL;
// Try and open the specified language file. If it fails, and the language
// isn't English, try falling back on opening 'english.txt' - some foreign
@@ -355,10 +353,8 @@
void FreeTextBuffer() {
- if (textBuffer) {
- free(textBuffer);
- textBuffer = NULL;
- }
+ free(textBuffer);
+ textBuffer = NULL;
}
/**
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list