Changeset 1211:73912ba03d83 in lemon-0.x
- Timestamp:
- 03/11/05 17:31:08 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1631
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/map_utils.h
r1199 r1211 14 14 * 15 15 */ 16 16 17 17 18 ///\ingroup mutils … … 192 193 Map::build(); 193 194 Item it; 194 for (getGraph()->first(it); it != INVALID; getGraph()->next(it)) { 195 const Graph* graph = Map::getGraph(); 196 for (graph->first(it); it != INVALID; graph->next(it)) { 195 197 Map::set(it, invMap.size()); 196 198 invMap.push_back(it); … … 243 245 class InverseMap { 244 246 protected: 245 InverseMap(const Graph& _graph) : graph( _graph) {}247 InverseMap(const Graph& _graph) : graph(&_graph) {} 246 248 public: 247 249 /// \brief Gives back the given item by its id. … … 251 253 Item operator[](int id) const { return graph->fromId(id, Item());} 252 254 private: 253 Graph* graph;255 const Graph* graph; 254 256 }; 255 257 … … 274 276 }; 275 277 276 277 278 } 278 279
Note: See TracChangeset
for help on using the changeset viewer.