[Scummvm-cvs-logs] SF.net SVN: scummvm: [22533] scummvm/trunk/engines/kyra

eriktorbjorn at users.sourceforge.net eriktorbjorn at users.sourceforge.net
Fri May 19 00:35:04 CEST 2006


Revision: 22533
Author:   eriktorbjorn
Date:     2006-05-19 00:34:24 -0700 (Fri, 19 May 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm/?rev=22533&view=rev

Log Message:
-----------
Using assert(_something->init()) is a bad idea. Assertions can be disabled.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/kyra.cpp
    scummvm/trunk/engines/kyra/kyra3.cpp
Modified: scummvm/trunk/engines/kyra/kyra.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra.cpp	2006-05-19 07:32:00 UTC (rev 22532)
+++ scummvm/trunk/engines/kyra/kyra.cpp	2006-05-19 07:34:24 UTC (rev 22533)
@@ -175,7 +175,8 @@
 	assert(_res);
 	_screen = new Screen(this, _system);
 	assert(_screen);
-	assert(_screen->init());
+	if (!_screen->init())
+		error("_screen->init() failed");
 	_sprites = new Sprites(this, _system);
 	assert(_sprites);
 	_seq = new SeqPlayer(this, _system);
@@ -189,7 +190,8 @@
 
 	_staticres = new StaticResource(this);
 	assert(_staticres);
-	assert(_staticres->init());
+	if (!_staticres->init())
+		error("_staticres->init() failed");
 	
 	initStaticResource();
 	

Modified: scummvm/trunk/engines/kyra/kyra3.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-19 07:32:00 UTC (rev 22532)
+++ scummvm/trunk/engines/kyra/kyra3.cpp	2006-05-19 07:34:24 UTC (rev 22533)
@@ -48,7 +48,8 @@
 	
 	_soundDigital = new SoundDigital(this, _mixer);
 	assert(_soundDigital);
-	assert(_soundDigital->init());
+	if (!_soundDigital->init())
+		error("_soundDigital->init() failed");
 	
 	uint32 sz;
 	_screen->loadFont(Screen::FID_6_FNT, _res->fileData("6.FNT", &sz));


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