diff options
author | Johannes Schickel | 2009-08-24 11:36:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-24 11:36:00 +0000 |
commit | ea08733873a0f2a0058ef452a7751beed4882e8e (patch) | |
tree | fa159d3f90b01120b95bae4e5a0c3c0703605cbd /engines | |
parent | 1f39c1b569831913ccf44f44113393f5c7510760 (diff) | |
download | scummvm-rg350-ea08733873a0f2a0058ef452a7751beed4882e8e.tar.gz scummvm-rg350-ea08733873a0f2a0058ef452a7751beed4882e8e.tar.bz2 scummvm-rg350-ea08733873a0f2a0058ef452a7751beed4882e8e.zip |
Small syntax change in the hope to make the motoezx target happy.
svn-id: r43692
Diffstat (limited to 'engines')
-rw-r--r-- | engines/m4/script.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/m4/script.h b/engines/m4/script.h index 63dc32958b..2cb2219b8d 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -120,8 +120,7 @@ public: clear(); } template<class T> - T *load(Common::File *fd, uint32 ofs) { - T *item; + void load(Common::File *fd, uint32 ofs, T *&item) { if (_cache.contains(ofs)) { item = (T*)(_cache[ofs]); } else { @@ -130,7 +129,6 @@ public: item->load(fd); _cache[ofs] = item; } - return item; } void clear() { // TODO: Free all cached items @@ -300,7 +298,8 @@ public: const T& toData(const ScriptValue &value) { printf("ScriptInterpreter::toData() index = %d; type = %d; max = %d\n", value.value, _data[value.value]->type, _data.size()); assert((uint32)value.value < _data.size()); - T *result = _dataCache->load<T>(_scriptFile, _data[value.value]->offset); + T *result = 0; + _dataCache->load(_scriptFile, _data[value.value]->offset, result); return *result; } |