From 40aac5fbf7a2f582ecc38d99c67a52e5fefdff17 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 24 Aug 2009 12:27:25 +0000 Subject: [PATCH] Add comment why the syntax for ScriptDataCache::load was changed. svn-id: r43694 --- engines/m4/script.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/engines/m4/script.h b/engines/m4/script.h index 2cb2219b8da..2eb608ccbb4 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -119,6 +119,15 @@ public: ~ScriptDataCache() { clear(); } + + // WORKAROUND: The old prototype for this function was: + // template T *load(Common::File *fd, uint32 ofs); + // that caused a parser error in g++ 3.3.6 used by our + // "motoezx" target of our buildbot. The actual parser + // error happended, when calling the function like this: + // "T *result = _dataCache->load(_scriptFile, _data[value.value]->offset);" + // in ScriptInterpreter::toData. To work around this + // we moved the return value as parameter instead. template void load(Common::File *fd, uint32 ofs, T *&item) { if (_cache.contains(ofs)) {