Changeset 1759:0bb3fb3baffd in lemon-0.x
- Timestamp:
- 11/04/05 11:55:13 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2291
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/iterable_maps.h
r1752 r1759 276 276 typedef _Graph Graph; 277 277 278 IterableIntMap(const Graph& graph) : Parent(graph) {}278 explicit IterableIntMap(const Graph& graph) : Parent(graph) {} 279 279 280 280 private: … … 334 334 return *this; 335 335 } 336 Reference& operator++() { 337 _map.set(_key, _map[_key] + 1); 338 return *this; 339 } 340 int operator++(int) { 341 int value = _map[_key]; 342 _map.set(_key, value + 1); 343 return value; 344 } 345 Reference& operator--() { 346 _map.set(_key, _map[_key] - 1); 347 return *this; 348 } 349 int operator--(int) { 350 int value = _map[_key]; 351 _map.set(_key, value - 1); 352 return value; 353 } 336 354 Reference& operator+=(int value) { 337 355 _map.set(_key, _map[_key] + value);
Note: See TracChangeset
for help on using the changeset viewer.