[Scummvm-cvs-logs] CVS: scummvm actor.h,1.3,1.4

Max Horn fingolfin at users.sourceforge.net
Sun May 19 05:40:02 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv5229

Modified Files:
	actor.h 
Log Message:
use memset to init members to 0 (yes I know we override new to use calloc, but that is a nasty hack, it won't work for stack allocated objects)

Index: actor.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/actor.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- actor.h	15 May 2002 10:25:00 -0000	1.3
+++ actor.h	19 May 2002 12:39:52 -0000	1.4
@@ -24,6 +24,7 @@
 #ifndef ACTOR_H
 #define ACTOR_H
 
+#include <string.h>
 #include "scummsys.h"
 
 class Scumm;
@@ -93,8 +94,8 @@
 
 public:
 
-	// Constructor
-	//Actor(Scumm *scumm) : _scumm(scumm) {}
+	// Constructor, sets all data to 0
+	Actor() { memset(this, 0, sizeof(Actor)); }
     void initActorClass(Scumm *scumm) {_scumm = scumm;}
 //protected:
 	void hideActor();





More information about the Scummvm-git-logs mailing list