[Scummvm-cvs-logs] SF.net SVN: scummvm: [30022] scummvm/trunk/common/hashmap.h
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Dec 28 01:08:29 CET 2007
Revision: 30022
http://scummvm.svn.sourceforge.net/scummvm/?rev=30022&view=rev
Author: fingolfin
Date: 2007-12-27 16:08:29 -0800 (Thu, 27 Dec 2007)
Log Message:
-----------
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...)
Modified Paths:
--------------
scummvm/trunk/common/hashmap.h
Modified: scummvm/trunk/common/hashmap.h
===================================================================
--- scummvm/trunk/common/hashmap.h 2007-12-28 00:08:23 UTC (rev 30021)
+++ scummvm/trunk/common/hashmap.h 2007-12-28 00:08:29 UTC (rev 30022)
@@ -120,10 +120,6 @@
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:
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(); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list