aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2002-05-19 12:39:52 +0000
committerMax Horn2002-05-19 12:39:52 +0000
commit92328dde8978e370851ee610e880d808d8bad84d (patch)
treeddb6237cc9dc34a226de753080c8e992fb7f3587
parentd2398b4b7e664dd174b4dcb827d83ccb8cfc3613 (diff)
downloadscummvm-rg350-92328dde8978e370851ee610e880d808d8bad84d.tar.gz
scummvm-rg350-92328dde8978e370851ee610e880d808d8bad84d.tar.bz2
scummvm-rg350-92328dde8978e370851ee610e880d808d8bad84d.zip
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)
svn-id: r4355
-rw-r--r--actor.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/actor.h b/actor.h
index df8b72ef31..752110f191 100644
--- a/actor.h
+++ b/actor.h
@@ -24,6 +24,7 @@
#ifndef ACTOR_H
#define ACTOR_H
+#include <string.h>
#include "scummsys.h"
class Scumm;
@@ -93,8 +94,8 @@ protected:
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();