diff options
author | Julien Templier | 2010-10-19 01:42:00 +0000 |
---|---|---|
committer | Julien Templier | 2010-10-19 01:42:00 +0000 |
commit | fdaa1b9c613fd5a1eae81652879f7bdb45c51be6 (patch) | |
tree | 7fc8d9adf7f6ad5de04da97d68e0e6a457d178de /engines/lastexpress/entities | |
parent | 01669d8de0ac2d1ec50c102abe79d3112075c5d8 (diff) | |
download | scummvm-rg350-fdaa1b9c613fd5a1eae81652879f7bdb45c51be6.tar.gz scummvm-rg350-fdaa1b9c613fd5a1eae81652879f7bdb45c51be6.tar.bz2 scummvm-rg350-fdaa1b9c613fd5a1eae81652879f7bdb45c51be6.zip |
LASTEXPRESS: Merge parameter creation into resetCurrentParameters()
svn-id: r53599
Diffstat (limited to 'engines/lastexpress/entities')
-rw-r--r-- | engines/lastexpress/entities/entity.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/engines/lastexpress/entities/entity.h b/engines/lastexpress/entities/entity.h index 881902ae80..22ebaad1ca 100644 --- a/engines/lastexpress/entities/entity.h +++ b/engines/lastexpress/entities/entity.h @@ -372,19 +372,14 @@ public: EntityCallParameters() { // We default to int parameters - create<EntityParametersIIII>(); + for (int i = 0; i < 4; i++) + parameters[i] = new EntityParametersIIII(); } ~EntityCallParameters() { clear(); } - template<class T> - void create() { - for (int i = 0; i < 4; i++) - parameters[i] = new T(); - } - void clear() { for (int i = 0; i < 4; i++) { if (parameters[i]) @@ -491,7 +486,9 @@ public: void resetCurrentParameters() { EntityCallParameters *params = &_parameters[_data.currentCall]; params->clear(); - params->create<T>(); + + for (int i = 0; i < 4; i++) + params->parameters[i] = new T(); } EntityCallData *getCallData() { return &_data; } |