diff options
-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; } |