aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2007-12-28 00:08:29 +0000
committerMax Horn2007-12-28 00:08:29 +0000
commit1eeaaab15dfb39eec074f9c4148c164a7b311e18 (patch)
tree6285cae590d59e09b24fa62a377acf27273d9d4b
parent9b0db4be37d023798dc321eec417f863a4774901 (diff)
downloadscummvm-rg350-1eeaaab15dfb39eec074f9c4148c164a7b311e18.tar.gz
scummvm-rg350-1eeaaab15dfb39eec074f9c4148c164a7b311e18.tar.bz2
scummvm-rg350-1eeaaab15dfb39eec074f9c4148c164a7b311e18.zip
Fix hashmap.h properly (this is not a bug in GCC 4.0 etc., rather it's a bug in newer GCC versions that they *accepted* the old code...)
svn-id: r30022
-rw-r--r--common/hashmap.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/common/hashmap.h b/common/hashmap.h
index fbefbc916e..579f0f9bfb 100644
--- a/common/hashmap.h
+++ b/common/hashmap.h
@@ -120,10 +120,6 @@ public:
class Iterator {
typedef const HashMap<Key, Val, HashFunc, EqualFunc> *hashmap_t;
friend class HashMap<Key, Val, HashFunc, EqualFunc>;
-#if (__GNUC__ == 4) && ( (__GNUC_MINOR__ == 0) || (__GNUC_MINOR__ == 1 && defined(_WIN32_WCE)) )
- public: // FIXME: Work around a bug in gcc version 4.0 (gcc 4.0.1 Apple Computer, Inc. build 5367 and gcc 4.0.2 AmigaOS build 20051012)
- // Also in gcc v. 4.1.0 for windows ce (cegcc)
-#endif
uint _idx;
hashmap_t _hashmap;
protected:
@@ -138,7 +134,9 @@ public:
public:
Iterator() : _idx(0), _hashmap(0) {}
- // HACK: to allow non const/const begin, end and find to work
+
+ // HACK: to allow non const/const begin, end and find to work.
+ friend class Iterator<const NodeType>;
Iterator(const Iterator<Node> &iter) : _idx(iter._idx), _hashmap(iter._hashmap) {}
NodeType &operator *() const { return *deref(); }