Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/bits/vector_map.h
- Timestamp:
- 03/02/07 19:04:28 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/vector_map.h
r2384 r2386 135 135 VectorMap& operator=(const CMap& cmap) { 136 136 checkConcept<concepts::ReadMap<Key, _Value>, CMap>(); 137 const typename Parent::Notifier* n otifier= Parent::notifier();137 const typename Parent::Notifier* nf = Parent::notifier(); 138 138 Item it; 139 for (n otifier->first(it); it != INVALID; notifier->next(it)) {139 for (nf->first(it); it != INVALID; nf->next(it)) { 140 140 set(it, cmap[it]); 141 141 } … … 177 177 virtual void add(const Key& key) { 178 178 int id = Parent::notifier()->id(key); 179 if (id >= (int)container.size()) {179 if (id >= int(container.size())) { 180 180 container.resize(id + 1); 181 181 } … … 188 188 virtual void add(const std::vector<Key>& keys) { 189 189 int max = container.size() - 1; 190 for (int i = 0; i < (int)keys.size(); ++i) {190 for (int i = 0; i < int(keys.size()); ++i) { 191 191 int id = Parent::notifier()->id(keys[i]); 192 192 if (id >= max) { … … 210 210 /// and it overrides the erase() member function of the observer base. 211 211 virtual void erase(const std::vector<Key>& keys) { 212 for (int i = 0; i < (int)keys.size(); ++i) {212 for (int i = 0; i < int(keys.size()); ++i) { 213 213 container[Parent::notifier()->id(keys[i])] = Value(); 214 214 }
Note: See TracChangeset
for help on using the changeset viewer.