[Scummvm-cvs-logs] SF.net SVN: scummvm:[43692] scummvm/trunk/engines/m4/script.h
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Aug 24 13:36:01 CEST 2009
Revision: 43692
http://scummvm.svn.sourceforge.net/scummvm/?rev=43692&view=rev
Author: lordhoto
Date: 2009-08-24 11:36:00 +0000 (Mon, 24 Aug 2009)
Log Message:
-----------
Small syntax change in the hope to make the motoezx target happy.
Modified Paths:
--------------
scummvm/trunk/engines/m4/script.h
Modified: scummvm/trunk/engines/m4/script.h
===================================================================
--- scummvm/trunk/engines/m4/script.h 2009-08-24 10:24:02 UTC (rev 43691)
+++ scummvm/trunk/engines/m4/script.h 2009-08-24 11:36:00 UTC (rev 43692)
@@ -120,8 +120,7 @@
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 @@
item->load(fd);
_cache[ofs] = item;
}
- return item;
}
void clear() {
// TODO: Free all cached items
@@ -300,7 +298,8 @@
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;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list