[Lemon-commits] [lemon_svn] klao: r465 - hugo/trunk/src/include
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:39:35 CET 2006
Author: klao
Date: Sat Apr 17 03:50:23 2004
New Revision: 465
Modified:
hugo/trunk/src/include/maps.h
Log:
megsem volt bug
Modified: hugo/trunk/src/include/maps.h
==============================================================================
--- hugo/trunk/src/include/maps.h (original)
+++ hugo/trunk/src/include/maps.h Sat Apr 17 03:50:23 2004
@@ -95,7 +95,7 @@
StdMap(const StdMap<Key,T1,Comp1> &m, const T &_v) { FIXME; }
ReferenceType operator[](const Key &k) {
- return ( *( (insert(PairType(k,v))).first ) ).second;
+ return insert(PairType(k,v)).first -> second;
}
ConstReferenceType operator[](const Key &k) const {
typename parent::iterator i = lower_bound(__k);
@@ -104,9 +104,7 @@
return (*i).second;
}
void set(const Key &k, const T &t) {
- // tyuha, ez valamiert segfault-olt igy:
- // parent::operator[](k) = t;
- ( *( (insert(PairType(k,t))).first ) ).second=t;
+ parent::operator[](k) = t;
}
/// Changes the default value of the map.
More information about the Lemon-commits
mailing list