diff options
-rw-r--r-- | common/hashmap.h | 13 | ||||
-rw-r--r-- | graphics/scaler/scale2x.h | 5 | ||||
-rw-r--r-- | graphics/scaler/scale3x.h | 4 |
3 files changed, 22 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; diff --git a/graphics/scaler/scale2x.h b/graphics/scaler/scale2x.h index cefa14f22a..a6365c113e 100644 --- a/graphics/scaler/scale2x.h +++ b/graphics/scaler/scale2x.h @@ -25,6 +25,11 @@ #define __restrict__ #endif +#ifdef __sgi +#define __restrict__ __restrict +#endif + + typedef unsigned char scale2x_uint8; typedef unsigned short scale2x_uint16; typedef unsigned scale2x_uint32; diff --git a/graphics/scaler/scale3x.h b/graphics/scaler/scale3x.h index 3f24d884e1..671a207570 100644 --- a/graphics/scaler/scale3x.h +++ b/graphics/scaler/scale3x.h @@ -25,6 +25,10 @@ #define __restrict__ #endif +#ifdef __sgi +#define __restrict__ __restrict +#endif + typedef unsigned char scale3x_uint8; typedef unsigned short scale3x_uint16; typedef unsigned scale3x_uint32; |