# HG changeset patch # User alpar # Date 1079729919 0 # Node ID 9a37b8d02d7477c0d89d23aaac8e45d9dc41d448 # Parent 1e36245f905d1a42b632a12c514b1b783138316c get() -> operator[]() diff -r 1e36245f905d -r 9a37b8d02d74 src/work/alpar/mapskeleton.h --- a/src/work/alpar/mapskeleton.h Fri Mar 19 15:41:58 2004 +0000 +++ b/src/work/alpar/mapskeleton.h Fri Mar 19 20:58:39 2004 +0000 @@ -18,7 +18,7 @@ ReadMapSkeleton() {} ///Reads an element of the map. - ValueType get(const KeyType &i) const {return ValueType();} + ValueType operator[](const KeyType &i) const {return ValueType();} }; @@ -70,8 +70,9 @@ ReferenceMapSkeleton(const ValueType &t) : ReadWriteMapSkeleton(t) {} ///Give a reference to the value belonging to a key. - ValueType &operator[](const KeyType &i) {return *(ValueType*)0;} - // const ValueType &operator[](const KeyType &i) const {return *(T*)0;} + ValueType &operator[](const KeyType &i) {return *(ValueType*)0;} + ///Give a const reference to the value belonging to a key. + const ValueType &operator[](const KeyType &i) const {return *(T*)0;} }; diff -r 1e36245f905d -r 9a37b8d02d74 src/work/alpar/smart_graph.h --- a/src/work/alpar/smart_graph.h Fri Mar 19 15:41:58 2004 +0000 +++ b/src/work/alpar/smart_graph.h Fri Mar 19 20:58:39 2004 +0000 @@ -374,7 +374,7 @@ void erase(const Node k) { } void set(Node n, T a) { container[n.n]=a; } - T get(Node n) const { return container[n.n]; } + //T get(Node n) const { return container[n.n]; } T& operator[](Node n) { return container[n.n]; } const T& operator[](Node n) const { return container[n.n]; } @@ -461,7 +461,7 @@ void erase(const Edge k) { } void set(Edge n, T a) { container[n.n]=a; } - T get(Edge n) const { return container[n.n]; } + //T get(Edge n) const { return container[n.n]; } T& operator[](Edge n) { return container[n.n]; } const T& operator[](Edge n) const { return container[n.n]; } @@ -603,7 +603,7 @@ void erase(const Edge k) { } void set(Edge n, T a) { container[n.idref()/2]=a; } - T get(Edge n) const { return container[n.idref()/2]; } + //T get(Edge n) const { return container[n.idref()/2]; } T& operator[](Edge n) { return container[n.idref()/2]; } const T& operator[](Edge n) const { return container[n.idref()/2]; }