[Scummvm-cvs-logs] scummvm master -> e10b59b62492c67fc7eeb6eccd39f0b75722338d

bluegr md5 at scummvm.org
Sat Jul 14 04:08:04 CEST 2012


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e10b59b624 TINSEL: Cleanup


Commit: e10b59b62492c67fc7eeb6eccd39f0b75722338d
    https://github.com/scummvm/scummvm/commit/e10b59b62492c67fc7eeb6eccd39f0b75722338d
Author: Filippos Karapetis (md5 at scummvm.org)
Date: 2012-07-13T19:07:16-07:00

Commit Message:
TINSEL: Cleanup

Changed paths:
    engines/tinsel/handle.cpp



diff --git a/engines/tinsel/handle.cpp b/engines/tinsel/handle.cpp
index c3089db..14d588d 100644
--- a/engines/tinsel/handle.cpp
+++ b/engines/tinsel/handle.cpp
@@ -99,14 +99,16 @@ void SetupHandleTable() {
 	MEMHANDLE *pH;
 	TinselFile f;
 
-	if (f.open(TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME)) {
+	const char *indexFileName = TinselV1PSX ? PSX_INDEX_FILENAME : INDEX_FILENAME;
+
+	if (f.open(indexFileName)) {
 		// get size of index file
 		len = f.size();
 
 		if (len > 0) {
 			if ((len % RECORD_SIZE) != 0) {
 				// index file is corrupt
-				error(FILE_IS_CORRUPT, TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME);
+				error(FILE_IS_CORRUPT, indexFileName);
 			}
 
 			// calc number of handles
@@ -132,16 +134,16 @@ void SetupHandleTable() {
 
 			if (f.eos() || f.err()) {
 				// index file is corrupt
-				error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
+				error(FILE_IS_CORRUPT, indexFileName);
 			}
 
 			// close the file
 			f.close();
 		} else {	// index file is corrupt
-			error(FILE_IS_CORRUPT, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
+			error(FILE_IS_CORRUPT, indexFileName);
 		}
 	} else {	// cannot find the index file
-		error(CANNOT_FIND_FILE, (TinselV1PSX? PSX_INDEX_FILENAME : INDEX_FILENAME));
+		error(CANNOT_FIND_FILE, indexFileName);
 	}
 
 	// allocate memory nodes and load all permanent graphics






More information about the Scummvm-git-logs mailing list