[Lemon-commits] [lemon_svn] deba: r1631 - hugo/trunk/src/lemon
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:46:41 CET 2006
Author: deba
Date: Fri Mar 11 17:31:08 2005
New Revision: 1631
Modified:
hugo/trunk/src/lemon/map_utils.h
Log:
Bug fix.
Modified: hugo/trunk/src/lemon/map_utils.h
==============================================================================
--- hugo/trunk/src/lemon/map_utils.h (original)
+++ hugo/trunk/src/lemon/map_utils.h Fri Mar 11 17:31:08 2005
@@ -14,6 +14,7 @@
*
*/
+
///\ingroup mutils
///\file
///\brief Map utilities.
@@ -191,7 +192,8 @@
virtual void build() {
Map::build();
Item it;
- for (getGraph()->first(it); it != INVALID; getGraph()->next(it)) {
+ const Graph* graph = Map::getGraph();
+ for (graph->first(it); it != INVALID; graph->next(it)) {
Map::set(it, invMap.size());
invMap.push_back(it);
}
@@ -242,7 +244,7 @@
/// \see inverse()
class InverseMap {
protected:
- InverseMap(const Graph& _graph) : graph(_graph) {}
+ InverseMap(const Graph& _graph) : graph(&_graph) {}
public:
/// \brief Gives back the given item by its id.
///
@@ -250,7 +252,7 @@
///
Item operator[](int id) const { return graph->fromId(id, Item());}
private:
- Graph* graph;
+ const Graph* graph;
};
/// \brief Constructor.
@@ -273,7 +275,6 @@
};
-
}
#endif
More information about the Lemon-commits
mailing list