[Scummvm-cvs-logs] CVS: scummvm/scumm dialogs.cpp,1.89,1.90

Max Horn fingolfin at users.sourceforge.net
Thu Dec 11 15:28:14 CET 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv20933

Modified Files:
	dialogs.cpp 
Log Message:
Fix for bug #858262 (Note: casting to GUI::OptionsDialog* is wrong, it leads to incorrect vtable access

Index: dialogs.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/dialogs.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- dialogs.cpp	9 Dec 2003 08:55:32 -0000	1.89
+++ dialogs.cpp	11 Dec 2003 20:11:14 -0000	1.90
@@ -454,12 +454,7 @@
 }
 
 void OptionsDialog::open() {
-	// MSVC6 FIX (Jamieson630):
-	// Simple notation would be GUI::OptionsDialog::open(), but
-	// MSVC6 has a problem with any notation that involves
-	// more than one set of double colons ::
-	// Hence the more convoluted notation.
-	((GUI::OptionsDialog *) this)->open();
+	GUI::OptionsDialog::open();
 
 	// update checkboxes, too
 	subtitlesCheckbox->setState(_scumm->_noSubtitles == false);
@@ -472,12 +467,7 @@
 		ConfMan.set("nosubtitles", !subtitlesCheckbox->getState(), _domain);
 	}
 
-	// MSVC6 FIX (Jamieson630):
-	// Simple notation would be GUI::OptionsDialog::close(), but
-	// MSVC6 has a problem with any notation that involves
-	// more than one set of double colons ::
-	// Hence the more convoluted notation.
-	((GUI::OptionsDialog *) this)->close();
+	GUI::OptionsDialog::close();
 
 
 	// Sync the engine with the config manager
@@ -508,12 +498,7 @@
 #endif
 		break;
 	default:
-		// MSVC6 FIX (Jamieson630):
-		// Simple notation would be GUI::OptionsDialog::handleCommand(), but
-		// MSVC6 has a problem with any notation that involves
-		// more than one set of double colons ::
-		// Hence the more convoluted notation.
-		((GUI::OptionsDialog *) this)->handleCommand(sender, cmd, data);
+		GUI::OptionsDialog::handleCommand(sender, cmd, data);
 	}
 }
 





More information about the Scummvm-git-logs mailing list