aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-24 12:27:25 +0000
committerJohannes Schickel2009-08-24 12:27:25 +0000
commit40aac5fbf7a2f582ecc38d99c67a52e5fefdff17 (patch)
tree8cbfb876f60aa6ce5eee89e6dd094452b0272bad
parentea08733873a0f2a0058ef452a7751beed4882e8e (diff)
downloadscummvm-rg350-40aac5fbf7a2f582ecc38d99c67a52e5fefdff17.tar.gz
scummvm-rg350-40aac5fbf7a2f582ecc38d99c67a52e5fefdff17.tar.bz2
scummvm-rg350-40aac5fbf7a2f582ecc38d99c67a52e5fefdff17.zip
Add comment why the syntax for ScriptDataCache::load was changed.
svn-id: r43694
-rw-r--r--engines/m4/script.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/engines/m4/script.h b/engines/m4/script.h
index 2cb2219b8d..2eb608ccbb 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<class T> 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<T>(_scriptFile, _data[value.value]->offset);"
+ // in ScriptInterpreter::toData. To work around this
+ // we moved the return value as parameter instead.
template<class T>
void load(Common::File *fd, uint32 ofs, T *&item) {
if (_cache.contains(ofs)) {