[Scummvm-cvs-logs] SF.net SVN: scummvm: [24791] scummvm/trunk/common/hashmap.h
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sun Nov 26 23:39:34 CET 2006
Revision: 24791
http://svn.sourceforge.net/scummvm/?rev=24791&view=rev
Author: fingolfin
Date: 2006-11-26 14:39:34 -0800 (Sun, 26 Nov 2006)
Log Message:
-----------
Replaced #ifdef hack in the HashMap code by a much nicer and cleaner 'friend class' statement (a similar change might be possible in class List)
Modified Paths:
--------------
scummvm/trunk/common/hashmap.h
Modified: scummvm/trunk/common/hashmap.h
===================================================================
--- scummvm/trunk/common/hashmap.h 2006-11-25 22:03:34 UTC (rev 24790)
+++ scummvm/trunk/common/hashmap.h 2006-11-26 22:39:34 UTC (rev 24791)
@@ -83,12 +83,8 @@
*/
template <class Key, class Val, class HashFunc = Hash<Key>, class EqualFunc = EqualTo<Key> >
class HashMap {
+ friend class const_iterator;
private:
-#if defined (_WIN32_WCE) || defined (_MSC_VER) || defined (__SYMBIAN32__) || defined (PALMOS_MODE) || defined (__MINT__)
-//FIXME evc4, msvc6,msvc7 & GCC 2.9x doesn't like it as private member
-public:
-#endif
-
struct Node {
Key _key;
Val _value;
@@ -114,8 +110,8 @@
typedef const HashMap<Key, Val, HashFunc, EqualFunc> * hashmap_t;
friend class HashMap<Key, Val, HashFunc, EqualFunc>;
protected:
- hashmap_t _hashmap;
uint _idx;
+ hashmap_t _hashmap;
const_iterator(uint idx, hashmap_t hashmap) : _idx(idx), _hashmap(hashmap) {}
const Node *deref() const {
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