aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJoost Peters2009-08-14 17:18:03 +0000
committerJoost Peters2009-08-14 17:18:03 +0000
commitedaa4a042237477fa38ddb2957c3a41888730633 (patch)
tree020082f54dddf0a4b7f266082955dea63317ded3 /common
parentddf617e2a7fcb0355cadb18156ef3281c9e9ce28 (diff)
downloadscummvm-rg350-edaa4a042237477fa38ddb2957c3a41888730633.tar.gz
scummvm-rg350-edaa4a042237477fa38ddb2957c3a41888730633.tar.bz2
scummvm-rg350-edaa4a042237477fa38ddb2957c3a41888730633.zip
MIPSpro compilation fixes / workarounds (from a patch by Rainer Canavan)
The hashmap.h change is ugly, but so far the only thing found to work. Suggestions for a better "fix" appreciated! svn-id: r43380
Diffstat (limited to 'common')
-rw-r--r--common/hashmap.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index f5059a4bcf..2a50bff07a 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -39,6 +39,13 @@
#endif
namespace Common {
+/**
+ * The sgi IRIX MIPSpro Compiler has difficulties with nested templates.
+ * This and the other __sgi conditionals below work around these problems.
+ */
+#ifdef __sgi
+template<class T> class IteratorImpl;
+#endif
// Enable the following #define if you want to check how many collisions the
// code produces (many collisions indicate either a bad hash function, or a
@@ -125,7 +132,9 @@ public:
int lookupAndCreateIfMissing(const Key &key);
void expandStorage(uint newCapacity);
+#ifndef __sgi
template<class T> friend class IteratorImpl;
+#endif
/**
* Simple HashMap iterator implementation.
@@ -133,7 +142,11 @@ public:
template<class NodeType>
class IteratorImpl {
friend class HashMap;
+#ifdef __sgi
+ template<class T> friend class Common::IteratorImpl;
+#else
template<class T> friend class IteratorImpl;
+#endif
protected:
typedef const HashMap hashmap_t;