1.1 --- a/lemon/xy.h Wed Oct 05 13:18:51 2005 +0000
1.2 +++ b/lemon/xy.h Wed Oct 05 13:19:30 2005 +0000
1.3 @@ -364,14 +364,13 @@
1.4 template<class M>
1.5 class XMap
1.6 {
1.7 - typename SmartReference<M>::Type _map;
1.8 + M& _map;
1.9 public:
1.10 - typedef True NeedCopy;
1.11
1.12 typedef typename M::Value::Value Value;
1.13 typedef typename M::Key Key;
1.14 ///\e
1.15 - XMap(typename SmartParameter<M>::Type map) : _map(map) {}
1.16 + XMap(M& map) : _map(map) {}
1.17 Value operator[](Key k) const {return _map[k].x;}
1.18 void set(Key k,Value v) {_map.set(k,typename M::Value(v,_map[k].y));}
1.19 };
1.20 @@ -401,9 +400,8 @@
1.21 template<class M>
1.22 class ConstXMap
1.23 {
1.24 - typename SmartConstReference<M>::Type _map;
1.25 + const M& _map;
1.26 public:
1.27 - typedef True NeedCopy;
1.28
1.29 typedef typename M::Value::Value Value;
1.30 typedef typename M::Key Key;
1.31 @@ -431,14 +429,13 @@
1.32 template<class M>
1.33 class YMap
1.34 {
1.35 - typename SmartReference<M>::Type _map;
1.36 + M& _map;
1.37 public:
1.38 - typedef True NeedCopy;
1.39
1.40 typedef typename M::Value::Value Value;
1.41 typedef typename M::Key Key;
1.42 ///\e
1.43 - YMap(typename SmartParameter<M>::Type map) : _map(map) {}
1.44 + YMap(M& map) : _map(map) {}
1.45 Value operator[](Key k) const {return _map[k].y;}
1.46 void set(Key k,Value v) {_map.set(k,typename M::Value(_map[k].x,v));}
1.47 };
1.48 @@ -468,9 +465,8 @@
1.49 template<class M>
1.50 class ConstYMap
1.51 {
1.52 - typename SmartConstReference<M>::Type _map;
1.53 + const M& _map;
1.54 public:
1.55 - typedef True NeedCopy;
1.56
1.57 typedef typename M::Value::Value Value;
1.58 typedef typename M::Key Key;
1.59 @@ -500,9 +496,8 @@
1.60 template<class M>
1.61 class NormSquareMap
1.62 {
1.63 - typename SmartConstReference<M>::Type _map;
1.64 + const M& _map;
1.65 public:
1.66 - typedef True NeedCopy;
1.67
1.68 typedef typename M::Value::Value Value;
1.69 typedef typename M::Key Key;