[Scummvm-cvs-logs] SF.net SVN: scummvm:[44523] scummvm/trunk/engines/sci/engine

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Oct 1 17:33:38 CEST 2009


Revision: 44523
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44523&view=rev
Author:   thebluegr
Date:     2009-10-01 15:33:38 +0000 (Thu, 01 Oct 2009)

Log Message:
-----------
Rewrote weird-looking code, which might lead to undefined behavior, according to GNU

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-10-01 15:09:12 UTC (rev 44522)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-10-01 15:33:38 UTC (rev 44523)
@@ -163,13 +163,12 @@
 					             && item->matchKey(message, modifiers))
 					            || ((type == SCI_EVT_SAID) /* Said event */
 					                && (item->_flags & MENU_ATTRIBUTE_FLAGS_SAID)
-					                && (said(s, item->_said, 
 #ifdef DEBUG_PARSER
-					                1
+					                && (said(s, item->_said, 1)
 #else
-									0
+					                && (said(s, item->_said, 0)
 #endif
-									) != SAID_NO_MATCH)
+									!= SAID_NO_MATCH)
 					               )
 					           )
 					   ) {

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-10-01 15:09:12 UTC (rev 44522)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-10-01 15:33:38 UTC (rev 44523)
@@ -103,13 +103,11 @@
 		return NULL_REG;
 	}
 
-	new_lastmatch = said(s, said_block, 
 #ifdef DEBUG_PARSER
-		1
+		new_lastmatch = said(s, said_block, 1);
 #else
-		0
+		new_lastmatch = said(s, said_block, 0);
 #endif
-		);
 	if (new_lastmatch  != SAID_NO_MATCH) { /* Build and possibly display a parse tree */
 
 #ifdef DEBUG_PARSER


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